Skip to content
This repository has been archived by the owner on Jun 22, 2023. It is now read-only.

Add workspaces kcpsanity cases #5

Merged
merged 0 commits into from
Aug 10, 2022

Conversation

zxiao-redhat
Copy link
Contributor

@zxiao-redhat zxiao-redhat commented Aug 5, 2022

Hi @kasturinarra @wangke19, I added some test cases related to workspaces:

  • list sub-workspaces under a specific workspace
STEP: 1) Get workspaces before test starts
Current workspace is "root:users:zu:yc:kcp-admin".
Note: 'kubectl ws' now matches 'cd' semantics: go to home workspace. 'kubectl ws -' to go back. 'kubectl ws .' to print current workspace.
STEP: 2) Create five workspaces under the home workspace
STEP: 2.1.0) Go to home workspace
Current workspace is "root:users:zu:yc:kcp-admin".
Note: 'kubectl ws' now matches 'cd' semantics: go to home workspace. 'kubectl ws -' to go back. 'kubectl ws .' to print current workspace.
STEP: 2.2.0) Create workspace under home workspace
Workspace "qetestztwm59vt" (type root:universal) created. Waiting for it to be ready...
Workspace "qetestztwm59vt" (type root:universal) is ready to use.
Current workspace is "root:users:zu:yc:kcp-admin:qetestztwm59vt" (type "root:universal").
.....

STEP: 3) Go to home workspace
Current workspace is "root:users:zu:yc:kcp-admin".
Note: 'kubectl ws' now matches 'cd' semantics: go to home workspace. 'kubectl ws -' to go back. 'kubectl ws .' to print current workspace.
STEP: 4) Check number of workspaces
Current workspace is "root:users:zu:yc:kcp-admin".
Note: 'kubectl ws' now matches 'cd' semantics: go to home workspace. 'kubectl ws -' to go back. 'kubectl ws .' to print current workspace.

passed: (40.9s) 2022-08-05T04:15:50 "[kcp] Kcpsanity Author:zxiao-Medium-2800715-Get all sub-workspaces under current workspace [Suite:openshift/conformance/parallel]"
  • delete workspace
STEP: 1) Go to home workspace
Current workspace is "root:users:zu:yc:kcp-admin".
Note: 'kubectl ws' now matches 'cd' semantics: go to home workspace. 'kubectl ws -' to go back. 'kubectl ws .' to print current workspace.
STEP: 2) Get current workspace
STEP: 3) Navigate to previous workspace
STEP: 4) Undo navigate action, and return to starting workspace

passed: (8.7s) 2022-08-05T07:08:15 "[kcp] Kcpsanity Author:zxiao-Medium-2800714-Navigate between workspaces using 'cd' semantics [Suite:openshift/conformance/parallel]"
  • navigate between workspaces using cd semantics
STEP: 1) Create workspace
Current workspace is "root:users:zu:yc:kcp-admin".
Note: 'kubectl ws' now matches 'cd' semantics: go to home workspace. 'kubectl ws -' to go back. 'kubectl ws .' to print current workspace.
Workspace "qetestmuvhldac" (type root:universal) created. Waiting for it to be ready...
Workspace "qetestmuvhldac" (type root:universal) is ready to use.
Current workspace is "root:users:zu:yc:kcp-admin:qetestmuvhldac" (type "root:universal").
STEP: 2) Check if workspace exists
Current workspace is "root:users:zu:yc:kcp-admin".
Note: 'kubectl ws' now matches 'cd' semantics: go to home workspace. 'kubectl ws -' to go back. 'kubectl ws .' to print current workspace.
STEP: 2) Delete workspace
Current workspace is "root:users:zu:yc:kcp-admin".
Note: 'kubectl ws' now matches 'cd' semantics: go to home workspace. 'kubectl ws -' to go back. 'kubectl ws .' to print current workspace.
workspace.tenancy.kcp.dev "qetestmuvhldac" deleted
STEP: 3) Check if workspace is fully deleted

passed: (16.7s) 2022-08-05T07:09:25 "[kcp] Kcpsanity Author:zxiao-Medium-2800716-Delete workspace [Suite:openshift/conformance/parallel]"

All cased tested locally. Because we haven't established a case naming system, I temporarily use our current case ID system. We can change it anytime if we agree on one naming format. Please take a look if you have time. Thanks

@wangke19
Copy link

wangke19 commented Aug 5, 2022

  1. For your case, I think it is executed by admin or non-admin user, they are different scenarios. We can describe case title like As an admin, I can ..., As a non-admin, I can ...
  2. For workspace operations, I think we can merge them into one test case.

@kasturinarra
Copy link
Contributor

kasturinarra commented Aug 5, 2022

@zimo-xiao also i see @PengHao Wang added some cases in the same lines, i suggest better to collaborate and work so that we do not duplicate the efforts, thanks !! From next time let us discuss what you would like to start picking up either to automate or to do some manual tests, thanks !!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants