update replication case (#1985)

* add replication case
This commit is contained in:
sigsbee 2017-08-07 18:12:01 +08:00 committed by GitHub
parent e3e722b1f8
commit cf7326cf18
20 changed files with 424 additions and 57 deletions

View File

@ -3,22 +3,39 @@ Test 7-01 - Create Replication Policy
# Purpose:
To verify that an admin user can create a replication policy.
To verify that admin user can create a replication rule.
# References:
User guide
# Environment:
* This test requires that a Harbor instance is running and available.
* A linux host with Docker CLI installed (Docker client).
* This test requires that at least two Harbor instances are running and available.
# Test Steps:
TBD
1. Login UI as admin user.
2. In Project replication page, add a replication rule using an existing endpoint with enable checked.
3. In Project replication page, add a replication rule using an existing endpoint without enable checked.
4. In Project replication page, add a replication rule using a new endpoint.
5. In Project replication page, add a replication rule using a new endpoint. Provide invalid values of input to see if validation works:
* endpoint name or ip address duplicate with an existing endpoint.
* endpoint ip address incorrect.
* endpoint username or password incorrect.
6. Add another rule with different name using the same endpoint.
# Expected Outcome:
TBD
* In step2, a rule with given name will be added. And all images will be replicated to remote.
* In step3, a rule will be added and enabled,no image replication job is started.
* In step4, a rule using new endpoint will be added.
* In step5, rule can not be added if use duplicate name or ip,
* In step5, if input wrong username/password/ip,rule can be added,but will cause test connection fail.
* In step6, rule can not be added.
# Possible Problems:
None
None

View File

@ -1,28 +1,28 @@
Test 7-02 - Project replication rules edit
Test 7-02 - Project replication rules edit
=======
# Purpose:
To verify project manager can edit repliciation rules.
# References:
User guide
# Environment:
# Purpose:
To verify project manager can edit repilciation rules.
# References:
User guide
# Environment:
*
*
# Test Steps:
1. Login UI as user A(non-admin).
2. Verify user A has atleast a project x with the role of project admin.
3. In the UI goto project X and goto replication.
4. Select a present replication rule, choose edit.
5. Change some value and save.
# Expect Outcome:
TBD
# Possible Problems:
* This test requires that at least two Harbor instances are running and available.
* Need at least one project that has at least one replication rule.
# Test Steps:
1. Login UI as admin user
2. In project replication page, choose a disabled rule and edit rule name, description, rule enable status and endpoint name, username, password.
3. In project replication page, choose an enabled rule and edit rule name, description, rule enable status and endpoint name, username, password.
# Expect Outcome:
* In step 2, Rule can be edited and error hint works correctly,if rule is enabled, should see jobs start.
* In step 3, Rule can not be edited.
# Possible Problems:
None

View File

@ -1,23 +1,25 @@
Test 7-03 Project replication rules disabe
Test 7-03 Project replication rules disable
=======
# Purpose:
TBD
To verify that an admin user can disable replication rules.
# References:
User Guide
# Environment:
TBD
* This test requires that at least two Harbor instances are running and available.
* Need at least one project that has at least one enabled rule.
# Test Steps:
TBD
1. Login UI as admin user.
2. In project replication page, disable a rule.
# Expected outcome:
* Rule can be disabled. Replication jobs in queues will be canceled
# Possible Problems:
None

View File

@ -3,21 +3,25 @@ Test 7-04 Project replication rules enable
# Purpose:
TBD
To verify an admin user can enable disabled rules.
# References:
User guide
# Environment:
* This test requires that at least two Harbor instance are running and avaliable.
* Need at least one project that has at least one disabled rule.
# Test Steps:
TBD
1. Login UI as admin user.
2. Push an image to project.
3. In project replication page, enable a disabled rule.
# Expected Outcome:
TBD
* In step3 rule become enabled, replication should start.
# Possible Problems:
None

View File

@ -3,21 +3,26 @@ Test 7-05 Project replication rules delete
# Purpose:
TBD
To verify that an admin user can delete replication rules.
# References:
User guide
# Environment:
* This test requires that a Harbor instance is running and available.
# Test Steps:
TBD
1. Login as admin user.
2. In project replication page,delete an enabled rule.
3. Disable an enabled rule with running job, delete the rule while there is unfinished job.
4. In project replication page, delete a disabled rule.
# Expected Outcome:
TBD
* In step2 rule can not be deleted.
* In step3 rule can not be deleted.
* In step4 rule can be deleted.
# Possible Problems:
None

View File

@ -3,20 +3,22 @@ Test 7-06 Project replication rules filter
# Purpose:
TBD
To verify rule filter works correctly.
# References:
User guide
# Environment:
* This test requires that two Harbor instance are running and avaiable and there are at least 5 rules of a project.
# Test Steps:
TBD
1. Login source registry ui as user.
2. In project replication page,input some character in rule filter and then clear the filter.
# Expected Outcome:
TBD
* In step2, rules can be filtered, after clearing filter, all rules are shown again.
# Possible Problems:
None

View File

@ -3,20 +3,25 @@ Test 7-07 Project replication jobs filter
# Purpose:
To verify replication jobs filter works correctly.
# References:
User guide
# Invironment:
# Environment:
* This test requires at least two Harbor instance are running and available, and a project with a few jobs.
# Test Steps:
TBD
1. Login source registry as admin user.
2. Create some project and create replication rules.
3. Push some images into the project to start replication jobs and keep them running for step 4.
4. In project replication page, input some character in jobs log filter, and then clear the filter.
# Expected Outcome:
TBD
* In step4, jobs can be filtered, and after clear filter, all jobs are shown again.
# Possible Problems:
None

View File

@ -3,21 +3,24 @@ Test 7-08 Project replication jobs log view
# Purpose:
TBD
To verify admin user can view replication jobs log.
# References:
User guide
# Environment:
* This test requires at least two Harbor instance are running and available.
* At least one replication job exist.
# Test Steps:
TBD
1. Login source registry UI as admin user.
2. In project replication page, select a replication job and view job log.
# Expected Outcome:
TBD
* In step2, user can view job log.
# POssible Problems:
# Possible Problems:
None

View File

@ -3,7 +3,25 @@ Test 7-11 Endpoints endpoints add
# Purpose
TBD
To verify admin user can add an endpoint
# References:
User guide
# Environments:
* This test requires at least two Harbor instance is running and available.
# Test Steps:
1. Login UI as admin user.
2. In replication page, add an endpoint with valid ip/hostname/username/password,click test connection to test connection.
3. In replication page, add an endpoint with invalid ip/hostname/username/password, click test connection to test connection.
# Expected Outcome:
* In step2 if endpoint is alive,test connection will successful, endpoint will add success.
* In step3 test connection will fail, endpoint will add success.
# Possible Problem:
None

View File

@ -3,7 +3,26 @@ Test 7-12 Endpoints endpoints edit
# Purpose
TBD
To verify admin user can edit edpoints.
# Reference
# References:
User guide
# Environment:
* This test requires at least two Harbor instance are running and available.
# Test Steps:
1. Login UI as admin user.
2. In replication page, choose an endpoint in use by a rule and edit setting.
3. In replication page, choose an endpoint not in use by a rule and edit setting.
# Expected Outcome:
* In step2, endpoint info can not be edited.
* In step3, endpoint info can be edited.
# Possible Problems:
None

View File

@ -0,0 +1,28 @@
Test 7-13 Endpoints endpoint delete
=======
# Purpose
To verify admin user can delete an endpoint.
# References:
User guide
# Environments:
* This test requires one Harbor instance is running and available.
* At least one endpoint should exist.
# Test Steps:
1. Login UI as admin user.
2. In replication page, delete an endpoint in use by a rule.
3. In replication page, delete an endpoint not in use by a rule.
# Expected Outcome:
* In step2, endpoint can not be deleted.
* In step3, endpoint can be deleted.
# Possible Problems:
None

View File

@ -0,0 +1,27 @@
Test 7-14 Endpoints endpoints filter
=======
# Purpose:
To verify endpoints filter works correctly.
# References:
User guide
# Environment:
* This test requires at least one Harbor instance is running and available. There are a few endpoints in the system.
# Test Steps:
1. Login UI as admin user.
2. In replication page,add some endpoints.
3. Input some characters in endpoints filter and then clear the filter.
# Expected Outcome:
* In step3, endpoints can be filtered, after clearing the filter, all endpoints should be shown again.
# Possible Problems:
None

View File

@ -0,0 +1,29 @@
Test 7-15 Rules: rule edit
=======
# Purpose:
To verify admin user can edit replication rules.
# References:
User guide
# Environment:
* This test requires at least two Harbor instances are running and available.
* Project has at least one enabled and one disabled replication rule.
# Test Steps:
1. Login UI as admin user.
2. In replication page,edit name, description, enable status, endpoint info of enabled replication rules.
3. Push an image to the project.
4. In replication page,edit name, description, enable status, endpoint info of disabled replication rules.
# Expected Outcome:
* In step2, rules can not be edited.
* In step4, rules can be edited. If enable rule, replication job will start.
# Possible Problems:
None

View File

@ -0,0 +1,26 @@
Test 7-16 Rules rule disable
=======
# Purpose:
To verify admin user can disable replication rles.
# References:
User guide
# Environment:
* This test requires at least two Harbor instances are running and available.
* Need at least one project that has at least one enabled rule.
# Test Steps:
1. Login UI as admin user.
2. In Replication rule page, disable an enabled replication rule.
# Expected Outcome:
* Rule can be disabled and replication jobs in queues will be canceled. Jobs are running will be stopped.
# Possible Problems:
None

View File

@ -0,0 +1,27 @@
Test 7-17 Rules rule enable
=======
# Purpose:
To verify admin user can enable disabled rules.
# References:
User guide
# Environment:
* This test requires two Harbor instances are running and available.
* Projects has at least one disabled replication rule or more.
# Test Steps:
1. Login UI as admin user.
2. Push an image to a project has at least one disabled rule.
3. In replication page, choose a disabled rule,enable it.
# Expected Outcome:
* Disabled rule can be enabled,after enable the rule, replication job will start.
# Possible Problems:
None

View File

@ -0,0 +1,31 @@
Test 7-18 Rules rule delete
=======
# Purpose:
To verify admin user can delete replication rules.
# References:
User guide
# Environment:
* This test requires at least two Harbor instances are running and available.
* Source registry has at least one endpoint.
* Projects has at least one replication rule or more.
# Test Steps:
1. Login UI as admin user.
2. In replication page, delete an enabled rule.
3. Disable an enabled rule with running job, delete the rule while there is unfinished job.
4. In replication page, delete a disabled rule.
# Expected Outcome:
* In step2, rule can not be deleted.
* In step3, rule can not be deleted.
* In step4, rule can be deleted.
# Possible Problems:
None

View File

@ -0,0 +1,26 @@
Test 7-19 Rules rule filter
=======
# Purpose:
To verify admin user can filter replication rules.
# References:
User guide
# Environment:
* This test requires at least one Harbor instance is running and available.
* Need at least one project with at least one replication rule.
# Test Steps:
1. Login UI as admin user.
2. In replication page,input some charactor in replication rules filter and then clear the filter.
# Expected Outcome:
* Rules can be filtered, after clearing the filter, all rules are shown again.
# Possible Problems:
None

View File

@ -0,0 +1,32 @@
Test 7-21 - Replication-push-images
=======
# Purpose:
To verify pushed images can be replicated to remote.
# Reference:
User guide
# Environment:
* This test requires that at least two Harbor instance are running and available.
* Need at least one project has at least one replication rule.
# Test Steps:
**NOTE:** In below test, Harbor instance should have at least one available endpoint.
1. Login UI as admin user;
2. Create a project and add an enabled replication rule.
3. Push an image to the created project.
4. Check replication job.
5. Check remote registry to see if the image has been replicated if project existing on remote registry.
6. Check remote registry to see if the image has been replicated if project not existing on remote registry.
# Expect Outcome:
* On remote registry can see duplicated projects and images.
# Possible Problems:
None

View File

@ -0,0 +1,35 @@
Test 7-22 - Replication-delete-images
=======
# Purpose:
To verify remote images can be delete when it is deleted.
# Reference:
User guide
# Environment:
* This test requires that at least two Harbor instance are running and available.
* Need at least one project has at least one replication rule.
# Test Steps:
**NOTE:** In below test, Harbor instance should have at least one available endpoint.
1. Login source registry UI as admin user.
2. Create a project and add an enabled replication rule.
3. Push at least one image to the created project, and wait until replication job is done.
4. Check the job log.
5. Delete a pushed image in UI from the source registry.
6. Check the replication job.
7. Check remote registry to see if the image has been deleted.
# Expeced Outcome:
* In step3, the remote will see replicated project and images.
* In step6, there will be a replication job and the deleted image will be deleted from remote too.
* In step7, images on remote registry should be deleted.
# Possible Problems:
None

View File

@ -0,0 +1,31 @@
Test 7-23- Replication verify remote cert
=======
# Purpose:
To verify that if the verify remote cert setting works.
# Reference:
User guide
# Environment:
* This test requires at least two Harbor instances run and available.
* The remote endpoint instance should be configured to use https and the remote harbor instance is set up with self-signed certificate.
# Test Steps:
1. Login source registry as admin user.
2. In configuration page, make sure replication verify remote cert is checked on(by default).
3. In replication page, add an https endpoint use self-signed cert. Click test connection button before save.
4. In configuraiton page, uncheck replication verify remote cert checkbox and save.
5. In replication page, choose the added https endpoint, and click test connection.
# Expected Outcome:
* In step3, test will fail with a certificate error.
* In step5, the test will successful.
# Possible Problems:
None