-
Notifications
You must be signed in to change notification settings - Fork 9
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
fix: update test #525
fix: update test #525
Conversation
/run pipeline |
@maheshwarishikha Did this test ever work? Wondering why all of a sudden we now need to add this import? Also the test failed with this: This can happen due to the known limitation around scoping the auth policy. To get it to pass, you will have to do some cleanup on our account. |
@maheshwarishikha we do not need this import as "testhelper" is already imported in the pr_test.go. Go lang shares imports at the same directory level. |
When I run local as below, I hit the same error.
And after importing that library, error is resolved. |
/run pipeline |
@maheshwarishikha I do not encounter that error. |
Maybe it is because you are explicitly running that test |
@ocofaigh i ran exactly that same test |
@rajatagarwal I wonder would it work if you cleared your go cache and re-ran? |
nopes...
Not sure, whats the difference between Rajat's and my m/c env.... 🤔 |
/run pipeline |
1 similar comment
/run pipeline |
@ocofaigh currently there is no existing policy in Dev account |
@ocofaigh Regardless if we have that import in both files it would fail with an "unused import" error.
|
@maheshwarishikha If the standard test and the upgrade test are trying to create the same auth policy, then yes we will face this issue. How about running one of the tests with key protect, and the other with hpcs so they don't clash? |
Are you trying out with the latest code? Because the new code added in other_test.go uses testhelper library. |
@maheshwarishikha I believe you are correct - I think this change is needed. Without it I get:
|
hmm..yes, that could be the reason. I'll check tests. |
@ocofaigh Got one question - Dont we use existing KP instance for any test? If yes, where are the details of KP instance stored? I do not find KP details at common-dev-assets/common-go-assets/common-permanent-resources.yaml There is one instance |
/run pipeline |
Alternate way is ...we can run tests sequentially instead of making example complex. This is what I tried and worked. Let me know your thoughts on this. Thanks |
@maheshwarishikha We don't have a permanent Key Protect instance. We just create one in the examples. That way we always have a unique instance ID and full end to end examples. This also mans Key Protect auth policies won't clash since its a unique instance every time |
So can we have the standard test using HPCS and the upgrade test using Key Protect? That way there won't be any clashes |
It can be done. In this case, the example needs modification such that it will create KP instance, auth policy, keys etc if kms_does_not_exist already. On a lighter note, how much it helps if we do this additional work in example just for PR test? why not to run test sequentially that also takes care of this clash policy issue? |
@maheshwarishikha I'm going to merge this to unblock the pipeline, however I still think we should re-work the example so it can be run in parallel. Otherwise it takes twice as long for pipeline to run tests |
🎉 This PR is included in version 2.7.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Description
Updates test
Release required?
x.x.X
)x.X.x
)X.x.x
)Release notes content
Run the pipeline
If the CI pipeline doesn't run when you create the PR, the PR requires a user with GitHub collaborators access to run the pipeline.
Run the CI pipeline when the PR is ready for review and you expect tests to pass. Add a comment to the PR with the following text:
Checklist for reviewers
Merge actions for mergers