mirror of
https://github.com/project-zot/zot.git
synced 2026-06-15 20:07:55 +08:00
committed by
Ramkumar Chinchani
parent
63b88d0e57
commit
fed5c09b71
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user