TLS certs in CLI client

resolve #194
This commit is contained in:
Roxana Nemulescu
2021-07-06 19:50:46 +03:00
committed by Ramkumar Chinchani
parent 63b88d0e57
commit fed5c09b71
5 changed files with 539 additions and 56 deletions
+7 -1
View File
@@ -8,7 +8,7 @@ TMPDIR := $(shell mktemp -d)
STACKER := $(shell which stacker)
.PHONY: all
all: doc binary binary-minimal debug test check
all: doc binary binary-minimal debug test test-clean check
.PHONY: binary-minimal
binary-minimal: doc
@@ -25,8 +25,14 @@ debug: doc
.PHONY: test
test:
$(shell mkdir -p test/data; cd test/data; ../scripts/gen_certs.sh; cd ${TOP_LEVEL}; sudo skopeo --insecure-policy copy -q docker://public.ecr.aws/t0x7q1g8/centos:7 oci:${TOP_LEVEL}/test/data/zot-test:0.0.1;sudo skopeo --insecure-policy copy -q docker://public.ecr.aws/t0x7q1g8/centos:8 oci:${TOP_LEVEL}/test/data/zot-cve-test:0.0.1)
$(shell sudo mkdir -p /etc/containers/certs.d/127.0.0.1:8089/; sudo cp test/data/client.* /etc/containers/certs.d/127.0.0.1:8089/; sudo cp test/data/ca.* /etc/containers/certs.d/127.0.0.1:8089/;)
$(shell sudo chmod a=rwx /etc/containers/certs.d/127.0.0.1:8089/*.key)
go test -tags extended -v -race -cover -coverpkg ./... -coverprofile=coverage.txt -covermode=atomic ./...
.PHONY: test-clean
test-clean:
$(shell sudo rm -rf /etc/containers/certs.d/127.0.0.1:8089/)
.PHONY: covhtml
covhtml:
go tool cover -html=coverage.txt -o coverage.html