diff --git a/registry_module_integration_test.go b/registry_module_integration_test.go index 67324c43a..805921fb0 100644 --- a/registry_module_integration_test.go +++ b/registry_module_integration_test.go @@ -64,12 +64,14 @@ func TestRegistryModulesList(t *testing.T) { }) t.Run("include no-code modules", func(t *testing.T) { - registryModuleTest3, registryModuleTest3Cleanup := createRegistryModule(t, client, orgTest, PrivateRegistry) - defer registryModuleTest3Cleanup() - - newSubscriptionUpdater(orgTest).WithPlusEntitlementPlan().Update(t) - _, noCodeModuleCleanup := createNoCodeRegistryModule(t, client, orgTest.Name, registryModuleTest3, nil) - defer noCodeModuleCleanup() + options := RegistryModuleCreateOptions{ + Name: String("iam"), + Provider: String("aws"), + NoCode: Bool(true), + RegistryName: PrivateRegistry, + } + rm, err := client.RegistryModules.Create(ctx, orgTest.Name, options) + require.NoError(t, err) modl, err := client.RegistryModules.List(ctx, orgTest.Name, &RegistryModuleListOptions{ Include: []RegistryModuleListIncludeOpt{ @@ -78,10 +80,8 @@ func TestRegistryModulesList(t *testing.T) { }) require.NoError(t, err) assert.Len(t, modl.Items, 3) - // only module 3 is no-code, so iterate through the results before - // the test assertion for _, m := range modl.Items { - if m.ID == registryModuleTest3.ID { + if m.ID == rm.ID { assert.True(t, m.NoCode) assert.Len(t, m.RegistryNoCodeModule, 1) }