File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 23
23
- name : Test
24
24
run : |
25
25
go mod tidy
26
- ls /home/runner/work/saido/saido/ssh-key/ci/
27
26
go test -v ./...
Original file line number Diff line number Diff line change @@ -35,11 +35,18 @@ func NewSSHForTest() driver.Driver {
35
35
yamlPath := fmt .Sprintf ("%s/%s" , workingDir , "config-test.yaml" )
36
36
conf := config .LoadConfig (yamlPath )
37
37
dashboardInfo := config .GetDashboardInfoConfig (conf )
38
+ var host config.Host
39
+ for ind := range dashboardInfo .Hosts {
40
+ if dashboardInfo .Hosts [ind ].Address == "0.0.0.0" {
41
+ host = dashboardInfo .Hosts [ind ]
42
+ }
43
+ }
44
+
38
45
return & driver.SSH {
39
- User : dashboardInfo . Hosts [ 0 ] .Connection .Username ,
40
- Host : dashboardInfo . Hosts [ 0 ] .Address ,
41
- Port : int (dashboardInfo . Hosts [ 0 ] .Connection .Port ),
42
- KeyFile : dashboardInfo . Hosts [ 0 ] .Connection .PrivateKeyPath ,
46
+ User : host .Connection .Username ,
47
+ Host : host .Address ,
48
+ Port : int (host .Connection .Port ),
49
+ KeyFile : host .Connection .PrivateKeyPath ,
43
50
KeyPass : "" ,
44
51
CheckKnownHosts : false ,
45
52
}
You can’t perform that action at this time.
0 commit comments