aboutsummaryrefslogtreecommitdiff
path: root/tests/submit
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-09-14 22:33:30 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-10-09 19:44:21 +0300
commite97c6b9b9c90a6f97019021d6bfcc73ed92580cc (patch)
tree3639a628d52b7b0ac6fff0eba5cf7e308921bf98 /tests/submit
parent1367aa09951e0aa7491bc2a5bf7209b0b47be65e (diff)
Filter packages manifest against CI request manifest in ci-load
Diffstat (limited to 'tests/submit')
-rw-r--r--tests/submit/README22
-rw-r--r--tests/submit/submit-dir.testscript8
-rw-r--r--tests/submit/submit-git.testscript8
3 files changed, 28 insertions, 10 deletions
diff --git a/tests/submit/README b/tests/submit/README
index 49ebd1e..1aecbd7 100644
--- a/tests/submit/README
+++ b/tests/submit/README
@@ -1,24 +1,26 @@
Prepare the test data with the following instructions.
-In an empty directory run:
+Create the git repository:
+
+$ mkdir hello.git
+$ git -C hello.git/ init --bare
+
+Create the project:
$ bdep new -t empty -C @cfg hello
-$ BDEP_EMAIL=user@example.org bdep new --package -t lib libhello -d hello
+$ BDEP_AUTHOR_EMAIL=user@example.org bdep new --package -t lib libhello -d hello
$ bdep init -d hello/libhello
Edit hello/libhello/manifest setting version to 0.1.0.
-$ mkdir hello.git
-$ git -C hello.git/ init --bare
-
$ git -C hello remote add origin "$(pwd)/hello.git"
$ git -C hello add '*'
$ git -C hello commit -m "Create"
$ git -C hello push --set-upstream origin master
-tar cf hello.tar.gz hello.git/
+$ tar cf hello.tar.gz hello.git/
-Move the archive into brep/tests/submit/ directory.
+Move the archive into tests/submit/ directory.
Locally run brep server configured to use submit-dir handler.
@@ -29,6 +31,6 @@ $ bdep publish \
--yes \
-d hello
-Replace the submission data directory in brep/tests/submit/ with the one
-produced with the above command, removing package.manifest and result.manifest
-files it contains.
+Replace the submission data directory in tests/submit/ with the one produced
+with the above command removing package.manifest and result.manifest files it
+contains.
diff --git a/tests/submit/submit-dir.testscript b/tests/submit/submit-dir.testscript
index 0b43aa7..8018d01 100644
--- a/tests/submit/submit-dir.testscript
+++ b/tests/submit/submit-dir.testscript
@@ -17,6 +17,14 @@
$* $~/dir 2>>~%EOE% != 0
%\[.+\] \[brep:error\] \[ref dir\] \[brep-submit-dir\]: '.+dir' does not exist or is not a directory%
EOE
+
+ : slash-stripped
+ :
+ : Test that the trailing slash is stripped from the data directory path.
+ :
+ $* $~/dir/ 2>>~%EOE% != 0
+ %\[.+\] \[brep:error\] \[ref dir\] \[brep-submit-dir\]: '.+dir' does not exist or is not a directory%
+ EOE
}
: success
diff --git a/tests/submit/submit-git.testscript b/tests/submit/submit-git.testscript
index e99c1d5..a0d76f5 100644
--- a/tests/submit/submit-git.testscript
+++ b/tests/submit/submit-git.testscript
@@ -82,6 +82,14 @@ pkg_ctl="$prj_ctl/hello.git"
$* "$root_tgt_url" ref dir 2>>~%EOE% != 0
%\[.+\] \[brep:error\] \[ref dir\] \[brep-submit-git\]: 'dir' does not exist or is not a directory%
EOE
+
+ : slash-stripped
+ :
+ : Test that the trailing slash is stripped from the data directory path.
+ :
+ $* "$root_tgt_url" dir/ 2>>~%EOE% != 0
+ %\[.+\] \[brep:error\] \[ref dir\] \[brep-submit-git\]: 'dir' does not exist or is not a directory%
+ EOE
}
: success