Create host (#276)

* Change testHostCatalog methods to be like other resource test methods

* Implement CreateHost

* Make allocHost return a pointer to a Host
This commit is contained in:
Michael Gaffney authored and GitHub committed 2020-08-17 17:06:31 -04:00
1 parent 282177afc2
commit e18cdc52b3
10 files changed
+351 -16

No files matched your search

+3 -1
View File
@@ -6,6 +6,7 @@ import (
"github.com/hashicorp/boundary/internal/db"
"github.com/hashicorp/boundary/internal/host/static/store"
"github.com/hashicorp/boundary/internal/iam"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
@@ -14,7 +15,8 @@ func TestHostSetMember_New(t *testing.T) {
conn, _ := db.TestSetup(t, "postgres")
conn.LogMode(false)
cats := testCatalogs(t, conn, 2)
_, prj := iam.TestScopes(t, conn)
cats := testCatalogs(t, conn, prj.PublicId, 2)
blueCat := cats[0]
blueSets := testSets(t, conn, blueCat.GetPublicId(), 2)