migtools / mig-e2e

End to end tests for OCP Migration
Apache License 2.0
0 stars 11 forks source link

[non-admin] Allow test cases to run with non-admin user in specific namespaces #97

Open pranavgaikwad opened 4 years ago

pranavgaikwad commented 4 years ago

I do not have much info to share at this point. This is just a reminder issue.

We need to think about adding test cases for non-admin flows. I will share details here soon.

alaypatel07 commented 4 years ago

Base test case to add after konveyor/mig-agnosticd#123:

  1. login as user1, run oc new-project user1-workload on source cluster
  2. run oc whoami -t, grab the token value
  3. login as admin
  4. Install operator and controller
  5. grant user1 "use" verb on mig-controllers, https://gist.github.com/alaypatel07/9e06cbb074eb7fcd2157aa65478761f5
  6. install operators via OLM on operator-hub. Need to make sure non-admin tags are installed
  7. login as user1 on destination
  8. create secret source-user1-token-secret, with token value from step 2.
  9. run oc whoami -t, create secret destination-user1-token-secret with the token value
  10. As admin create MigClusters, source and destination
  11. As user1 create MigTokens with source-user1-token-secret and destination-user1-token-secret
  12. wait for migtokens to get ready
  13. create MigPlan with user1-workload namespace, wait for it to get ready
  14. wait for MigPlan to go ready
  15. create MigMigration
  16. wait for migmigration to succeed