feat(hostcatalogs): Classify all proto fields

This commit is contained in:
Johan Brandhorst-Satzkorn committed 2022-04-20 13:32:31 -04:00
1 parent 5440195cce
commit 8fa3e8dee0
11 files changed
+446 -219

No files matched your search

@@ -714,7 +714,9 @@ func toPluginCatalog(ctx context.Context, in *HostCatalog) (*pb.HostCatalog, err
if err := proto.Unmarshal(in.GetAttributes(), attrs); err != nil {
return nil, errors.Wrap(ctx, err, op, errors.WithMsg("unable to unmarshal attributes"))
}
hc.Attributes = attrs
hc.Attrs = &pb.HostCatalog_Attributes{
Attributes: attrs,
}
}
if in.Secrets != nil {
hc.Secrets = in.Secrets
@@ -687,7 +687,7 @@ func TestRepository_UpdateCatalog(t *testing.T) {
return func(t *testing.T, ctx context.Context) {
t.Helper()
assert := assert.New(t)
assert.Empty(cmp.Diff(mustStruct(want), gotOnUpdateCatalogRequest.CurrentCatalog.Attributes, protocmp.Transform()))
assert.Empty(cmp.Diff(mustStruct(want), gotOnUpdateCatalogRequest.CurrentCatalog.GetAttributes(), protocmp.Transform()))
}
}
@@ -695,7 +695,7 @@ func TestRepository_UpdateCatalog(t *testing.T) {
return func(t *testing.T, ctx context.Context) {
t.Helper()
assert := assert.New(t)
assert.Empty(cmp.Diff(mustStruct(want), gotOnUpdateCatalogRequest.NewCatalog.Attributes, protocmp.Transform()))
assert.Empty(cmp.Diff(mustStruct(want), gotOnUpdateCatalogRequest.NewCatalog.GetAttributes(), protocmp.Transform()))
}
}