Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCM-9780 | test: automated id:65900 install with use-local-credentials will work #2396

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jerichokeyne
Copy link
Contributor

Automated id:65900 which tests that a cluster installed with the --use-local-credentials flag will install correctly

output:

$ TEST_PROFILE=rosa-non-sts-local-creds ginkgo run --focus 65900 tests/e2e/
Running Suite: ROSA CLI e2e tests suite - /home/jericho/work/repos/rosa/tests/e2e
=================================================================================
Random Seed: 1724876476

Will run 1 of 156 specs
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS•SSSSSSSSSSSSS

Ran 1 of 156 Specs in 0.436 seconds
SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 155 Skipped
PASS

Ginkgo ran 1 suite in 1.722011s
Test Suite Passed

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 28, 2024
@OAharoni-RedHat
Copy link
Contributor

test LGTM, could you explain to me what the flag does just for my own sake?

@jerichokeyne
Copy link
Contributor Author

@OAharoni-RedHat I believe it just makes it so that when you install a non-sts cluster it will use your AWS credentials from your machine

@OAharoni-RedHat
Copy link
Contributor

@OAharoni-RedHat I believe it just makes it so that when you install a non-sts cluster it will use your AWS credentials from your machine

@jerichokeyne maybe i'm going to out myself as clueless here but isn't that what it already does? Since we need to set up an AWS_PROFILE for it to grab info from already right? Or am I misunderstanding

@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 3, 2024
@jerichokeyne
Copy link
Contributor Author

@OAharoni-RedHat I believe it just makes it so that when you install a non-sts cluster it will use your AWS credentials from your machine

@jerichokeyne maybe i'm going to out myself as clueless here but isn't that what it already does? Since we need to set up an AWS_PROFILE for it to grab info from already right? Or am I misunderstanding

I'll be honest I'm not completely sure what the difference is. I think the difference is that both will use your local credentials for installing, but this flag makes the cluster use your credentials instead of the osdCcsAdmin credentials. It's apparently something we don't fully support even though it's something we test for 🤷

@jfrazierRH
Copy link
Contributor

It looks like the step for testing vs an STS cluster is missing. It might make sense to split that into a separate negative test case.

Also, does the cluster itself describe that it used local credentials in any way? Or is it only evident in the json structure?

@jerichokeyne
Copy link
Contributor Author

jerichokeyne commented Sep 4, 2024

@jfrazierRH

It looks like the step for testing vs an STS cluster is missing. It might make sense to split that into a separate negative test case.

Ah, looks like I forgot that part. I'll have to do some more research into how to do that since it's an error at install time

Also, does the cluster itself describe that it used local credentials in any way? Or is it only evident in the json structure?

As far as I know it's only evident in the json

Copy link

codecov bot commented Sep 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 29.37%. Comparing base (b91fefb) to head (15157ec).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2396   +/-   ##
=======================================
  Coverage   29.37%   29.37%           
=======================================
  Files         161      161           
  Lines       22350    22350           
=======================================
  Hits         6566     6566           
  Misses      15239    15239           
  Partials      545      545           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jerichokeyne
Copy link
Contributor Author

@jfrazierRH I added that negative test case

@jfrazierRH
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 4, 2024
Copy link
Contributor

openshift-ci bot commented Sep 4, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: jerichokeyne, jfrazierRH
Once this PR has been reviewed and has the lgtm label, please assign pvasant for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Contributor

openshift-ci bot commented Sep 4, 2024

@jerichokeyne: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-presubmits-pr-rosa-sts-advanced 7d73f4c link false /test e2e-presubmits-pr-rosa-sts-advanced
ci/prow/e2e-presubmits-pr-rosa-hcp-advanced 7d73f4c link false /test e2e-presubmits-pr-rosa-hcp-advanced

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@@ -1018,6 +1018,19 @@ var _ = Describe("Classic cluster creation validation",
Expect(errorOutput.String()).To(ContainSubstring("etcd encryption cannot be disabled on clusters with FIPS mode"))
})

It("validate use-local-credentials won't work with sts - [id:65900]",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to make sure your cluster is STS here or ?

@@ -536,6 +536,17 @@ var _ = Describe("Healthy check",
}

})

It("with use-local-credentials will work - [id:65900]", labels.Runtime.Day1Post, labels.High,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you aim at having 2 test cases in the automation, I would split the original test case, so we have 2 case ids

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 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could just check that

Expect(jsonData.DigBool("properties", "use_local_credentials")).To(profile.ClusterConfig.UseLocalCredentials)

No need to skip IMO

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 12, 2024
@openshift-merge-robot
Copy link
Contributor

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants