From ec7f2f3d5709ca189d67a89e915efb47bc1df51a Mon Sep 17 00:00:00 2001 From: Anna Winkler <3526523+annawinkler@users.noreply.github.com> Date: Thu, 5 May 2022 09:54:11 -0600 Subject: [PATCH] wip --- registry_provider.go | 3 +-- registry_provider_integration_test.go | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/registry_provider.go b/registry_provider.go index 3c33916cf..83d2d8964 100644 --- a/registry_provider.go +++ b/registry_provider.go @@ -67,7 +67,6 @@ type RegistryProvider struct { Links map[string]interface{} `jsonapi:"links,omitempty"` } -// TODO - verify the permissions and which are required type RegistryProviderPermissions struct { CanDelete bool `jsonapi:"attr,can-delete,omitempty"` CanUploadAsset bool `jsonapi:"attr,can-upload-asset,omitempty"` @@ -154,7 +153,7 @@ func (r *registryProviders) Create(ctx context.Context, organization string, opt return nil, err } - // Private providers must match their namespace and organization name + // For private providers, the organization name and namespace must be the same. // This is enforced by the API as well if options.RegistryName == PrivateRegistry && organization != options.Namespace { return nil, ErrInvalidPrivateProviderNamespaceDoesntMatchOrganization diff --git a/registry_provider_integration_test.go b/registry_provider_integration_test.go index 6628ac7b6..6b87b8e44 100644 --- a/registry_provider_integration_test.go +++ b/registry_provider_integration_test.go @@ -24,10 +24,12 @@ func TestRegistryProvidersList(t *testing.T) { providers := make([]*RegistryProvider, 0) // these providers will be destroyed when the org is cleaned up for i := 0; i < createN; i++ { + // Create public providers providerTest, _ := createPublicRegistryProvider(t, client, orgTest) providers = append(providers, providerTest) } for i := 0; i < createN; i++ { + // Create private providers providerTest, _ := createPrivateRegistryProvider(t, client, orgTest) providers = append(providers, providerTest) }