Skip to content

Commit 35352ee

Browse files
committed
pkcs11 test with upcoming changes
Signed-off-by: Vivek Kumar Sahu <[email protected]>
1 parent 162ced4 commit 35352ee

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

test/e2e_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ go test -tags=e2e -v ./test/... -run TestSignVerifyClean
8181

8282
# Test pkcs11 token signing
8383
echo "testing pkcs11 token signing"
84-
CONTAINER_ID=$(docker run -dit --name softhsm -p 2345:2345 vegardit/softhsm2-pkcs11-proxy)
84+
CONTAINER_ID=$(docker run -dit --name softhsm -v $(pwd):/root/cosign -p 2345:2345 vegardit/softhsm2-pkcs11-proxy)
8585
docker exec -i $CONTAINER_ID /bin/bash < ./test/e2e_test_pkcs11.sh
8686
cleanup_pkcs11() {
8787
docker rm -f $CONTAINER_ID

test/e2e_test_pkcs11.sh

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,13 @@
1616

1717
set -ex
1818

19-
cd $HOME
2019
apk update
21-
# add git
22-
apk add git
23-
# clone cosign
24-
git clone https://github.com/sigstore/cosign.git
25-
# cd to cosign
26-
cd cosign/
20+
2721
# add make pcsc-lite-libs go command
2822
apk add make build-base go
29-
# build tags pkcs11key
30-
# go build -tags=pkcs11key ./cmd/cosign
31-
# test
23+
24+
cd /root/cosign
25+
3226
softhsm2-util --init-token --free --label "My Token" --pin 1234 --so-pin 1234
3327
go test -v -cover -coverprofile=./cover.out -tags=softhsm,pkcs11key -coverpkg github.com/sigstore/cosign/v2/pkg/cosign/pkcs11key test/pkcs11_test.go
3428

0 commit comments

Comments
 (0)