Skip to content

Commit

Permalink
OCM-9780 | test: automated id:65900 install with use-local-credential…
Browse files Browse the repository at this point in the history
…s will work
  • Loading branch information
jerichokeyne committed Aug 28, 2024
1 parent 22f38bd commit 4b586f8
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 1 deletion.
29 changes: 28 additions & 1 deletion tests/ci/data/profiles/rosa-classic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -214,4 +214,31 @@ profiles:
oidc_config: ""
shared_vpc: false
imdsv2: "optional"
admin_enabled: false
admin_enabled: false
- as: rosa-non-sts-local-creds
version: latest
channel_group: candidate
region: "us-east-1"
cluster:
multi_az: true
instance_type: ""
hcp: false
sts: false
byo_vpc: false
private_link: false
private: false
etcd_encryption: false
autoscale: false
kms_key: false
networking: false
proxy_enabled: false
label_enabled: false
zones: "us-east-1a,us-east-1b,us-east-1c"
tag_enabled: false
etcd_kms: false
fips: false
oidc_config: ""
shared_vpc: false
imdsv2: "optional"
admin_enabled: true
use_local_credentials: true
11 changes: 11 additions & 0 deletions tests/e2e/test_rosacli_cluster_post.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,17 @@ var _ = Describe("Healthy check",
Expect(jsonData.DigString("nodes", "compute_machine_type", "id")).To(Equal(profile.ClusterConfig.InstanceType))
}
})

It("with use-local-credentials will work - [id:65900]", labels.Runtime.Day1Post, labels.High,
func() {
By("Check that the cluster was installed with the right profile")
if !profile.ClusterConfig.UseLocalCredentials {
Skip("Must be ran with the use_local_credentials flag set")
}
jsonData, err := clusterService.GetJSONClusterDescription(clusterID)
Expect(err).ToNot(HaveOccurred())
Expect(jsonData.DigBool("properties", "use_local_credentials")).To(BeTrue())
})
})

var _ = Describe("Create cluster with the version in some channel group testing",
Expand Down
1 change: 1 addition & 0 deletions tests/utils/profilehandler/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ type ClusterConfig struct {
SharedVPC bool `yaml:"shared_vpc,omitempty" json:"shared_vpc,omitempty"`
TagEnabled bool `yaml:"tag_enabled,omitempty" json:"tag_enabled,omitempty"`
NetworkType string `yaml:"network_type,omitempty" json:"network_type,omitempty"`
UseLocalCredentials bool `yaml:"use_local_credentials,omitempty" json:"use_local_credentials,omitempty"`
}

// UserData will record the user data prepared for resource clean up
Expand Down
5 changes: 5 additions & 0 deletions tests/utils/profilehandler/profile_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,11 @@ func GenerateClusterCreateFlags(profile *Profile, client *rosacli.Client) ([]str
)

}
if profile.ClusterConfig.UseLocalCredentials {
flags = append(flags,
"--use-local-credentials",
)
}
if profile.ClusterConfig.STS {
var accRoles *rosacli.AccountRolesUnit
var oidcConfigID string
Expand Down

0 comments on commit 4b586f8

Please sign in to comment.