aboutsummaryrefslogtreecommitdiff
path: root/tests/submit/submit-pub.testscript
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-09-21 17:52:52 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-09-24 19:28:18 +0300
commit8c3da8abdb16ecad007dc60068deb90e151737ea (patch)
treedb69db08961a042dcac9e21d84b7f2c8fe4ba8bc /tests/submit/submit-pub.testscript
parent880f96e9325646dc792e1c4e37879f3810b9e8f1 (diff)
Fix submission handler issues arising due to package archive name ambiguity
Now we take into account the fact that the foo-bar-1.0.tar.gz archive may contain either foo-bar/1.0 or foo/bar-1.0 package.
Diffstat (limited to 'tests/submit/submit-pub.testscript')
-rw-r--r--tests/submit/submit-pub.testscript18
1 files changed, 14 insertions, 4 deletions
diff --git a/tests/submit/submit-pub.testscript b/tests/submit/submit-pub.testscript
index b73d108..78c42b6 100644
--- a/tests/submit/submit-pub.testscript
+++ b/tests/submit/submit-pub.testscript
@@ -76,7 +76,7 @@ clone_root_rep = cp --no-cleanup -r $root_rep ./ &pkg-1/*** &?pkg.lock
: for-real
:
- : Here we create the (fake) package revision which is expected to be removed
+ : Here we also create the package revision which is expected to be removed
: by the handler.
:
{
@@ -84,8 +84,13 @@ clone_root_rep = cp --no-cleanup -r $root_rep ./ &pkg-1/*** &?pkg.lock
$clone_root_rep;
ln -s pkg-1 pkg;
- mkdir --no-cleanup pkg-1/1/prj;
- touch --no-cleanup pkg-1/1/prj/libhello-0.1.0+1.tar.gz;
+ # Add the libhello/0.1.0+1 package revision to the repository.
+ #
+ mkdir --no-cleanup pkg-1/1/hello;
+ tar -xf $~/$data_dir/libhello-0.1.0.tar.gz &libhello-0.1.0/***;
+ sed -i -e 's/(version: 0.1.0)/\1+1/' libhello-0.1.0/manifest;
+ mv libhello-0.1.0 libhello-0.1.0+1;
+ tar cfz pkg-1/1/hello/libhello-0.1.0+1.tar.gz libhello-0.1.0+1;
$* $~/pkg $~/$data_dir &!pkg-1/*** &pkg-*/*** >>"EOO";
: 1
@@ -94,16 +99,21 @@ clone_root_rep = cp --no-cleanup -r $root_rep ./ &pkg-1/*** &?pkg.lock
reference: $checksum
EOO
+ test -f pkg/1/hello/libhello-0.1.0+1.tar.gz == 1;
+ test -f pkg/1/hello/libhello-0.1.0.tar.gz;
+
# While at it, test the duplicate submission.
#
$clone_root_data_clean;
- $* $~/pkg $~/$data_dir >>"EOO"
+ $* $~/pkg $~/$data_dir >>"EOO";
: 1
status: 422
message: duplicate submission
reference: $checksum
EOO
+
+ test -f pkg/1/hello/libhello-0.1.0.tar.gz
}
: result-url