Skip to content

Commit

Permalink
fix dashboard host for ssh test
Browse files Browse the repository at this point in the history
  • Loading branch information
derhnyel committed Nov 25, 2022
1 parent 27f1cdd commit d0503f9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
1 change: 0 additions & 1 deletion .github/workflows/test-ssh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,4 @@ jobs:
- name: Test
run: |
go mod tidy
ls /home/runner/work/saido/saido/ssh-key/ci/
go test -v ./...
15 changes: 11 additions & 4 deletions integration/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,18 @@ func NewSSHForTest() driver.Driver {
yamlPath := fmt.Sprintf("%s/%s", workingDir, "config-test.yaml")
conf := config.LoadConfig(yamlPath)
dashboardInfo := config.GetDashboardInfoConfig(conf)
var host config.Host
for ind := range dashboardInfo.Hosts {
if dashboardInfo.Hosts[ind].Address == "0.0.0.0" {
host = dashboardInfo.Hosts[ind]
}
}

return &driver.SSH{
User: dashboardInfo.Hosts[0].Connection.Username,
Host: dashboardInfo.Hosts[0].Address,
Port: int(dashboardInfo.Hosts[0].Connection.Port),
KeyFile: dashboardInfo.Hosts[0].Connection.PrivateKeyPath,
User: host.Connection.Username,
Host: host.Address,
Port: int(host.Connection.Port),
KeyFile: host.Connection.PrivateKeyPath,
KeyPass: "",
CheckKnownHosts: false,
}
Expand Down

0 comments on commit d0503f9

Please sign in to comment.