Skip to content

Commit

Permalink
fix test case
Browse files Browse the repository at this point in the history
  • Loading branch information
xwjdsh committed Jan 5, 2022
1 parent a87f314 commit 98d5d5d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sshconfig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,15 @@ func TestAdd(t *testing.T) {
Path: testConfigPath,
Alias: "test1",
Connect: "xxx@1.2.3.4:11",
Config: map[string]string{},
})
require.NotNil(t, err)

host, err := Add(mainConfigPath, &AddOption{
Path: testConfigPath,
Alias: "test4",
Connect: "xxx@1.2.3.4",
Config: map[string]string{},
})
require.Nil(t, err)
require.Equal(t, "22022", host.ImplicitConfig["port"])
Expand Down Expand Up @@ -171,6 +173,7 @@ func TestUpdate(t *testing.T) {
host, err = Update(mainConfigPath, &UpdateOption{
Alias: "home1",
Connect: "1.2.3.4:11",
Config: map[string]string{},
})
require.Nil(t, err)
require.Equal(t, "1.2.3.4", host.OwnConfig["hostname"])
Expand Down

0 comments on commit 98d5d5d

Please # to comment.