feat(host/plugin): Always send plugin information on DHC requests
This commit is contained in:
1 parent
c3d03f69d8
commit
60dc0ec3ff
11 files changed
+440
-289
No files matched your search
@@ -462,3 +462,23 @@ func TestHostCatalog_SecretsHmac(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestCatalogAgg(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
conn, _ := db.TestSetup(t, "postgres")
|
||||
rw := db.New(conn)
|
||||
_, prj := iam.TestScopes(t, iam.TestRepo(t, conn, db.TestWrapper(t)))
|
||||
plg := plugin.TestPlugin(t, conn, "test")
|
||||
hc := TestCatalog(t, conn, prj.GetPublicId(), plg.GetPublicId())
|
||||
|
||||
ca := catalogAgg{}
|
||||
ca.PublicId = hc.GetPublicId()
|
||||
require.NoError(t, rw.LookupByPublicId(ctx, &ca))
|
||||
|
||||
outHc, _ := ca.toCatalogAndPersisted()
|
||||
require.NotNil(t, outHc)
|
||||
require.Empty(t, cmp.Diff(hc, outHc, protocmp.Transform()))
|
||||
|
||||
require.NotNil(t, ca.plugin())
|
||||
require.Empty(t, cmp.Diff(plg, ca.plugin(), protocmp.Transform()))
|
||||
}
|
||||
Reference in new issue
Block a user