Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
paladin-devops committed Nov 19, 2024
1 parent a07d4ad commit 4c915e6
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions registry_module_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand All @@ -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)
}
Expand Down

0 comments on commit 4c915e6

Please sign in to comment.