Skip to content

Commit 8551339

Browse files
committed
tests: update trustroot before offline test
Current test assets require a trust root which is newer than the one embedded in sigstore-python: Update the trust roots before running offline tests. Move the whole offline-test setup into Makefile to make it a little easier to manage.
1 parent ca6e4d3 commit 8551339

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,4 @@ jobs:
6161
run: sudo apt-get install -y firejail
6262

6363
- name: run tests offline
64-
run: |
65-
make dev INSTALL_EXTRA=test
66-
firejail --noprofile --net=none --env=TEST_OFFLINE=1 make test-nocoverage
64+
run: make test-offline INSTALL_EXTRA=test

Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,15 @@ test-nocoverage: $(VENV)/pyvenv.cfg
7575
. $(VENV_BIN)/activate && \
7676
pytest $(T) $(TEST_ARGS)
7777

78+
# test-offline requires firejail
79+
.PHONY: test-offline
80+
test-offline: $(VENV)/pyvenv.cfg
81+
# ensure trust root is updated, then run tests inside no-network firejail
82+
. $(VENV_BIN)/activate && \
83+
python -m sigstore plumbing update-trust-root && \
84+
python -m sigstore --staging plumbing update-trust-root && \
85+
firejail --noprofile --net=none --env=TEST_OFFLINE=1 pytest $(T) $(TEST_ARGS)
86+
7887
.PHONY: doc
7988
doc: $(VENV)/pyvenv.cfg
8089
. $(VENV_BIN)/activate && \

0 commit comments

Comments
 (0)