Skip to content

Commit 8fddfc9

Browse files
committed
additional tests for version suffixes
1 parent 726e7a9 commit 8fddfc9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

scripts/test-ingest-tarball.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ tarballs_success=(
5757
"$tstdir/eessi-2000.01-scripts-123456.tar.gz 2000.01 scripts"
5858
"$tstdir/eessi-2000.01-software-123456.tar.gz 2000.01 software/linux/x86_64/intel/haswell"
5959
"$tstdir/eessi-2000.01-software-123456.tar.zst 2000.01 software/linux/x86_64/intel/haswell"
60+
# Version suffixes inside the tarball are allowed if they match: -[0-9A-Za-z._-]+
61+
"$tstdir/eessi-2000.01-software-123456.tar.gz 2000.01-001 software/linux/x86_64/intel/haswell"
62+
"$tstdir/eessi-2000.01-software-123456.tar.gz 2000.01-20250101-001-abc software/linux/x86_64/intel/haswell"
6063
)
6164

6265
# Test that should return an error
@@ -92,6 +95,8 @@ tarballs_fail=(
9295
# Invalid compression / file extension
9396
"$tstdir/eessi-2000.01-software-123456.tar 2000.01 software/linux/x86_64/intel/haswell"
9497
"$tstdir/eessi-2000.01-software-123456.tar.xz 2000.01 software/linux/x86_64/intel/haswell"
98+
# Invalid version suffix in the tarball
99+
"$tstdir/eessi-2000.01-software-123456.tar.gz 2000.01#001 software/linux/x86_64/intel/haswell"
95100
)
96101

97102
# update_lmod_caches.sh script requires that directory exists,

0 commit comments

Comments
 (0)