Skip to content

Commit 15a19dc

Browse files
authored
Fix various issues (#500)
* tests: Fix several copy and paste errors in error messages Signed-off-by: Stefan Berger <[email protected]> * _cli: Remove type=bool from --allow_symlinks definition With click v8.2.0, When type=bool and is_flag=True are both set, then the --allow_symlinks option does not work properly, which fails the test case for example. This behavior seems to be fixed in click v8.2.1. Nevertheless, remove type=bool from the definition of the option since it doesn't seem to be necessary. Signed-off-by: Stefan Berger <[email protected]> * ci: Run apt update before apt install Run apt update before apt install to avoid issues with updated packages. Signed-off-by: Stefan Berger <[email protected]> --------- Signed-off-by: Stefan Berger <[email protected]>
1 parent acdbf4d commit 15a19dc

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

.github/workflows/integration.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ jobs:
4949
run: |
5050
set -euxo pipefail
5151
if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then
52+
sudo apt update
5253
sudo apt install softhsm2 gnutls-bin
5354
./scripts/pkcs11-tests/softhsm_setup setup
5455
fi

scripts/tests/test-sign-verify

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ if ! python -m model_signing \
6161
--certificate_chain ./keys/certificate/int-ca-cert.pem \
6262
--ignore-paths "${ignorefile}" \
6363
"${TMPDIR}"; then
64-
echo "Error: 'sign key' failed"
64+
echo "Error: 'sign certificate' failed"
6565
exit 1
6666
fi
6767

@@ -71,7 +71,7 @@ if ! python -m model_signing \
7171
--certificate_chain ./keys/certificate/ca-cert.pem \
7272
--ignore-paths "${ignorefile}" \
7373
"${TMPDIR}"; then
74-
echo "Error: 'sign key' failed"
74+
echo "Error: 'verify certificate' failed"
7575
exit 1
7676
fi
7777

@@ -134,7 +134,7 @@ if ! python -m model_signing \
134134
--certificate_chain "${DIR}/keys/certificate/int-ca-cert.pem" \
135135
--ignore-paths "$(basename "${ignorefile}")" \
136136
. ; then
137-
echo "Error: 'sign key' failed"
137+
echo "Error: 'sign certificate' failed"
138138
exit 1
139139
fi
140140

@@ -144,7 +144,7 @@ if ! python -m model_signing \
144144
--certificate_chain "${DIR}/keys/certificate/ca-cert.pem" \
145145
--ignore-paths "$(basename "${ignorefile}")" \
146146
. ; then
147-
echo "Error: 'sign key' failed"
147+
echo "Error: 'verify certificate' failed"
148148
exit 1
149149
fi
150150

@@ -180,7 +180,7 @@ if ! python -m model_signing \
180180
--ignore-paths "../$(basename "${ignorefile}")" \
181181
--allow_symlinks \
182182
.. ; then
183-
echo "Error: 'sign key' failed"
183+
echo "Error: 'sign certificate' failed"
184184
exit 1
185185
fi
186186

@@ -193,7 +193,7 @@ if ! python -m model_signing \
193193
--ignore-paths "$(basename "${ignorefile}")" \
194194
--allow_symlinks \
195195
. ; then
196-
echo "Error: 'sign key' failed"
196+
echo "Error: 'verify certificate' failed"
197197
exit 1
198198
fi
199199

src/model_signing/_cli.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@
118118
# Decorator for the commonly used option to allow symlinks
119119
_allow_symlinks_option = click.option(
120120
"--allow_symlinks",
121-
type=bool,
122121
is_flag=True,
123122
help="Whether to allow following symlinks when signing or verifying files.",
124123
)

0 commit comments

Comments
 (0)