diff --git a/registry_module.go b/registry_module.go index 6d99ca16e..6cb24496a 100644 --- a/registry_module.go +++ b/registry_module.go @@ -530,7 +530,6 @@ func (r *registryModules) Read(ctx context.Context, moduleID RegistryModuleID) ( if moduleID.ExternalID != "" { u = fmt.Sprintf("registry-modules/%s", url.PathEscape(moduleID.ExternalID)) } else { - if moduleID.RegistryName == "" { log.Println("[WARN] Support for using the RegistryModuleID without RegistryName is deprecated as of release 1.5.0 and may be removed in a future version. The preferred method is to include the RegistryName in RegistryModuleID.") moduleID.RegistryName = PrivateRegistry diff --git a/registry_module_integration_test.go b/registry_module_integration_test.go index 6c290629e..5dffffd60 100644 --- a/registry_module_integration_test.go +++ b/registry_module_integration_test.go @@ -1193,6 +1193,27 @@ func TestRegistryModulesRead(t *testing.T) { }) }) + t.Run("with a external ID field for private module", func(t *testing.T) { + rm, err := client.RegistryModules.Read(ctx, RegistryModuleID{ + ExternalID: registryModuleTest.ID, + }) + require.NoError(t, err) + require.NotEmpty(t, rm) + assert.Equal(t, registryModuleTest.ID, rm.ID) + + t.Run("permissions are properly decoded", func(t *testing.T) { + require.NotEmpty(t, rm.Permissions) + assert.True(t, rm.Permissions.CanDelete) + assert.True(t, rm.Permissions.CanResync) + assert.True(t, rm.Permissions.CanRetry) + }) + + t.Run("timestamps are properly decoded", func(t *testing.T) { + assert.NotEmpty(t, rm.CreatedAt) + assert.NotEmpty(t, rm.UpdatedAt) + }) + }) + t.Run("without a name", func(t *testing.T) { rm, err := client.RegistryModules.Read(ctx, RegistryModuleID{ Organization: orgTest.Name,