harbor/tests/apitests/python/library/notation.py
Yang Jiao 4d2a8fbcf6
[cherry-pick]Add notation sign artifact API test case (#19550)
Add notation sign artifact  API test case

Fix #19545

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2023-11-07 08:32:16 +00:00

11 lines
311 B
Python

# -*- coding: utf-8 -*-
import base
def generate_cert():
command = ["notation", "cert", "generate-test", "--default", "wabbit-networks.io"]
base.run_command(command)
def sign_artifact(artifact):
command = ["notation", "sign", "-d", "--allow-referrers-api", artifact]
base.run_command(command)