Export TestSets helper function (#292)
This commit is contained in:
1 parent
3a3cdd7219
commit
b24fc185a7
6 files changed
+56
-34
No files matched your search
@@ -44,3 +44,23 @@ func Test_TestHosts(t *testing.T) {
|
||||
assert.NotEmpty(a.GetPublicId())
|
||||
}
|
||||
}
|
||||
|
||||
func Test_TestSets(t *testing.T) {
|
||||
t.Helper()
|
||||
assert, require := assert.New(t), require.New(t)
|
||||
conn, _ := db.TestSetup(t, "postgres")
|
||||
wrapper := db.TestWrapper(t)
|
||||
_, prj := iam.TestScopes(t, iam.TestRepo(t, conn, wrapper))
|
||||
|
||||
require.NotNil(prj)
|
||||
assert.NotEmpty(prj.GetPublicId())
|
||||
|
||||
c := TestCatalogs(t, conn, prj.GetPublicId(), 1)[0]
|
||||
|
||||
count := 4
|
||||
sets := TestSets(t, conn, c.GetPublicId(), count)
|
||||
assert.Len(sets, count)
|
||||
for _, s := range sets {
|
||||
assert.NotEmpty(s.GetPublicId())
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user