Handler for Host CRUDL actions (#287)

This commit is contained in:
Todd Knight authored and GitHub committed 2020-08-20 08:20:26 -07:00
1 parent 8dad85fef4
commit d5678c4f80
33 files changed
+1944 -372

No files matched your search

+20
View File
@@ -24,3 +24,23 @@ func Test_TestCatalogs(t *testing.T) {
assert.NotEmpty(c.GetPublicId())
}
}
func Test_TestHosts(t *testing.T) {
t.Helper()
assert, require := assert.New(t), require.New(t)
conn, _ := db.TestSetup(t, "postgres")
wrapper := db.TestWrapper(t)
org, _ := iam.TestScopes(t, iam.TestRepo(t, conn, wrapper))
require.NotNil(org)
assert.NotEmpty(org.GetPublicId())
c := TestCatalogs(t, conn, org.GetPublicId(), 1)[0]
count := 4
accounts := TestHosts(t, conn, c.GetPublicId(), count)
assert.Len(accounts, count)
for _, a := range accounts {
assert.NotEmpty(a.GetPublicId())
}
}