-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use map for Client.GetSSHKeys(...) response
- Loading branch information
1 parent
b8ab235
commit 7bbfc38
Showing
2 changed files
with
25 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package integration | ||
|
||
import ( | ||
"context" | ||
"github.com/stretchr/testify/assert" | ||
"testing" | ||
) | ||
|
||
// NOTE: This test assumes the host instance has | ||
// a user configured with SSH keys. This should | ||
// always be the case when using the `make e2e` | ||
// target but may not always be the case when running | ||
// the `make e2e-local` target. | ||
func TestGetSSHKeys(t *testing.T) { | ||
t.Parallel() | ||
|
||
sshKeys, err := metadataClient.GetSSHKeys(context.Background()) | ||
assert.NoError(t, err) | ||
|
||
assert.Greater(t, len(sshKeys.Users), 0) | ||
for _, v := range sshKeys.Users { | ||
assert.Greater(t, len(v), 0) | ||
} | ||
} |