From 8cca04f439e579d68e32bbc29dcb6dec305a5ccd Mon Sep 17 00:00:00 2001 From: sigsbee <23101283+sigsbee@users.noreply.github.com> Date: Mon, 14 May 2018 23:36:12 +0800 Subject: [PATCH] Add project level content trust case (#4964) Add project level content trust testcase --- .../9-30-Project-level-content-trust.md | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 tests/testcases/Group9-Content-trust/9-30-Project-level-content-trust.md diff --git a/tests/testcases/Group9-Content-trust/9-30-Project-level-content-trust.md b/tests/testcases/Group9-Content-trust/9-30-Project-level-content-trust.md new file mode 100644 index 000000000..97ec7865c --- /dev/null +++ b/tests/testcases/Group9-Content-trust/9-30-Project-level-content-trust.md @@ -0,0 +1,40 @@ +Test 9-30 Project enable content trust +======= + +# Purpose: + +To verify project level content trust works correctly. + +# References: +User guide + +# Environment: + +* This test requires one Harbor instance is runnning and available. +* A Linux host with Docker CLI installed (Docker client). + +# Test Steps: +**NOTE:** +In below test, should be replaced by your harbor's ip or FQDN. If you are using a self-signed certificate,make sure to copy the CA root cert into ```/etc/docker/certs.d/``` and ```$HOME/.docker/tls/:4443/``` +project a should be replaced by meaingful and longer name. + +1. Login UI and create a project a. +2. Push an image to project a. +3. On Docker clinet, run +```sh +export DOCKER_CONTENT_TRUST=1 +export DOCKER_CONTNET_TRUST_SERVER=https://:4443 +``` +and login Harbor. +4. Push an image to project a. +5. In project a configuration page, enabled project level content trust. +6. Pull the image the first time pushed. +7. Pull the image the second time pushed. + +# Expected Outcome: + +* In step6, the image can not be pulled. +* In step7, the image can be pulled. + +# Possible Problems: +None