Skip to content

Commit 544868b

Browse files
committed
test(docker): force the dup path in the Update-repo probe
1 parent 88328d0 commit 544868b

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

‎.github/workflows/exp-opensuse.yml‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Throwaway experiment (deleted after it runs): proves the fix in
22
# docker/Dockerfile by forcing openSUSE-Tumbleweed-Update unreachable.
3+
# A dup --dry-run before the install forces the code path that failed:
34
# "fixed" must build; "mutant" (the pre-fix Dockerfile) must fail.
45
name: exp-opensuse
56
on:
@@ -28,9 +29,13 @@ jobs:
2829
assert s.count(key) == 1, 'anchor missing'
2930
bad = ('\t\tzypper --non-interactive modifyrepo --url '
3031
'http://invalid.invalid/ openSUSE-Tumbleweed-Update; \\\n')
31-
open(p, 'w').write(s.replace(key, bad + key))
32+
s = s.replace(key, bad + key)
33+
k2 = '\t\tpkgs="gcc clang'
34+
assert s.count(k2) == 1, 'pkgs anchor missing'
35+
dup = '\t\tzypper --non-interactive dup --dry-run --no-recommends; \\\n'
36+
open(p, 'w').write(s.replace(k2, dup + k2))
3237
PY
33-
grep -n 'invalid.invalid' docker/Dockerfile
38+
grep -nE 'invalid.invalid|dry-run' docker/Dockerfile
3439
set +e
3540
docker build -f docker/Dockerfile -t probe \
3641
--build-arg BASE=opensuse/tumbleweed --build-arg CC=gcc \

0 commit comments

Comments
 (0)