Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Commit 8113dec

Browse files
author
Baha Shaaban
committed
[FABG-751] SDK PKCS11 tests are broken with Mutual TLS
Fixed the working directory to import PKs Change-Id: I7a47327aefce9b82b103f107bd7b7e952a2d8c95 Signed-off-by: Baha Shaaban <baha.shaaban@securekey.com>
1 parent 33034df commit 8113dec

File tree

5 files changed

+9
-10
lines changed

5 files changed

+9
-10
lines changed

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,6 @@ integration-tests-stable-negative: clean-tests depend-noforce populate-noforce
358358
.PHONY: integration-tests-stable-pkcs11
359359
integration-tests-stable-pkcs11: clean-tests depend-noforce populate-noforce
360360
@. $(FIXTURE_DOCKERENV_PATH)/stable-env.sh && \
361-
. $(FIXTURE_DOCKERENV_PATH)/nomutualtls-env.sh && \
362361
. $(FIXTURE_CRYPTOCONFIG_PATH)/env.sh && \
363362
$(FABRIC_DEV_REGISTRY_PRE_CMD) && \
364363
cd $(FIXTURE_DOCKERENV_PATH) && \

test/scripts/integration-pkcs11.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ PKGS=($(${GO_CMD} list ${REPO}/test/integration/... 2> /dev/null | \
4646
# Reduce tests to changed packages.
4747
if [ "${TEST_CHANGED_ONLY}" = true ]; then
4848
# findChangedFiles assumes that the working directory contains the repo; so change to the repo directory.
49-
PWD=$(pwd)
49+
PWD_ORIG=$(pwd)
5050
cd "${GOPATH}/src/${REPO}"
5151
findChangedFiles
52-
cd ${PWD}
52+
cd ${PWD_ORIG}
5353

5454
if [[ "${CHANGED_FILES[@]}" =~ ( |^)(test/fixtures/|test/metadata/|test/scripts/|Makefile( |$)|Gopkg.lock( |$)|ci.properties( |$)) ]]; then
5555
echo "Test scripts, fixtures or metadata changed - running all tests"
@@ -78,7 +78,7 @@ if [ ${#PKGS[@]} -eq 0 ]; then
7878
exit 0
7979
fi
8080

81-
workingDir=$(pwd)
81+
workingDir=${GOPATH}/src/${REPO}
8282
declare -a PRIVATE_KEYS=($(find ${workingDir}/test/fixtures/fabric/${FABRIC_CRYPTOCONFIG_VERSION} | grep '/users/' | grep '_sk$' | tr '\n' ' '))
8383
PRIVATE_KEYS+=($(find ${workingDir}/test/fixtures/fabric/${FABRIC_CRYPTOCONFIG_VERSION} | grep 'User1@tls.example.com' | grep '.key$' | tr '\n' ' '))
8484

test/scripts/integration.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ fi
5353
# Reduce tests to changed packages.
5454
if [ "${TEST_CHANGED_ONLY}" = true ]; then
5555
# findChangedFiles assumes that the working directory contains the repo; so change to the repo directory.
56-
PWD=$(pwd)
56+
PWD_ORIG=$(pwd)
5757
cd "${GOPATH}/src/${REPO}"
5858
findChangedFiles
59-
cd ${PWD}
59+
cd ${PWD_ORIG}
6060

6161
if [[ "${CHANGED_FILES[@]}" =~ ( |^)(test/fixtures/|test/metadata/|test/scripts/|Makefile( |$)|Gopkg.lock( |$)|ci.properties( |$)) ]]; then
6262
echo "Test scripts, fixtures or metadata changed - running all tests"

test/scripts/negative.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ PKGS=($(${GO_CMD} list ${REPO}/test/integration/negative/... 2> /dev/null | \
4242
# Reduce tests to changed packages.
4343
if [ "${TEST_CHANGED_ONLY}" = true ]; then
4444
# findChangedFiles assumes that the working directory contains the repo; so change to the repo directory.
45-
PWD=$(pwd)
45+
PWD_ORIG=$(pwd)
4646
cd "${GOPATH}/src/${REPO}"
4747
findChangedFiles
48-
cd ${PWD}
48+
cd ${PWD_ORIG}
4949

5050
if [[ "${CHANGED_FILES[@]}" =~ ( |^)(test/fixtures/|test/metadata/|test/scripts/|Makefile( |$)|Gopkg.lock( |$)|ci.properties( |$)) ]]; then
5151
echo "Test scripts, fixtures or metadata changed - running all tests"

test/scripts/unit-pkcs11.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ declare -a PKGS=(
4242
# Reduce unit tests to changed packages.
4343
if [ "$TEST_CHANGED_ONLY" = true ]; then
4444
# findChangedFiles assumes that the working directory contains the repo; so change to the repo directory.
45-
PWD=$(pwd)
45+
PWD_ORIG=$(pwd)
4646
cd "${GOPATH}/src/${REPO}"
4747
findChangedFiles
48-
cd ${PWD}
48+
cd ${PWD_ORIG}
4949

5050
if [[ "${CHANGED_FILES[@]}" =~ ( |^)(test/fixtures/|test/metadata/|test/scripts/|Makefile( |$)|Gopkg.lock( |$)|gometalinter.json( |$)|ci.properties( |$)) ]]; then
5151
echo "Test scripts, fixtures or metadata changed - running all tests"

0 commit comments

Comments
 (0)