From b777cee2a0e5bb2d6c2d552d11c59672b0db8aa7 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 10 Sep 2018 12:33:54 +0300 Subject: Adjust package submission result manifest message --- tests/submit/submit-git.testscript | 63 +++++++++++++++++++++++++------------- 1 file changed, 42 insertions(+), 21 deletions(-) (limited to 'tests/submit/submit-git.testscript') diff --git a/tests/submit/submit-git.testscript b/tests/submit/submit-git.testscript index 8a00714..e99c1d5 100644 --- a/tests/submit/submit-git.testscript +++ b/tests/submit/submit-git.testscript @@ -106,7 +106,7 @@ pkg_ctl="$prj_ctl/hello.git" "$tgt_url" $root_ref_dir $data_dir >>"EOO"; : 1 status: 200 - message: libhello/0.1.0 submission is queued + message: package submission is queued: libhello/0.1.0 reference: $checksum EOO @@ -191,7 +191,7 @@ pkg_ctl="$prj_ctl/hello.git" $* "file:///$~/tgt.git" ref $data_dir >>"EOO" : 1 status: 200 - message: libhello/0.1.0 submission is queued + message: package submission is queued: libhello/0.1.0 reference: $checksum EOO } @@ -201,14 +201,16 @@ pkg_ctl="$prj_ctl/hello.git" : Test that on the first package submit the project and package names : ownership is successfully aquired. Reference repo is absent. : + : Note that here we also pass the --result-url option. + : { $clone_root_data; $clone_root_tgt; - $* "file:///$~/tgt.git" $data_dir >>"EOO" + $* --result-url 'https://example.com/' "file:///$~/tgt.git" $data_dir >>"EOO" : 1 status: 200 - message: libhello/0.1.0 submission is queued + message: package submission is queued: https://example.com/libhello/0.1.0 reference: $checksum EOO } @@ -249,7 +251,7 @@ pkg_ctl="$prj_ctl/hello.git" $* "file:///$~/tgt.git" $root_ref_dir $data_dir >>"EOO" : 1 status: 200 - message: libhello/0.1.0 submission is queued + message: package submission is queued: libhello/0.1.0 reference: $checksum EOO } @@ -303,7 +305,7 @@ pkg_ctl="$prj_ctl/hello.git" $* "file:///$~/tgt.git" ref $data_dir >>"EOO"; : 1 status: 200 - message: libhello/0.1.0 submission is queued + message: package submission is queued: libhello/0.1.0 reference: $checksum EOO @@ -357,7 +359,7 @@ pkg_ctl="$prj_ctl/hello.git" $* "file:///$~/tgt.git" ref $data_dir >>"EOO" : 1 status: 200 - message: libhello/0.1.0 submission is queued + message: package submission is queued: libhello/0.1.0 reference: $checksum EOO } @@ -392,7 +394,7 @@ pkg_ctl="$prj_ctl/hello.git" $* "file:///$~/tgt.git" ref $data_dir >>"EOO" : 1 status: 200 - message: libhello/0.1.0 submission is queued + message: package submission is queued: libhello/0.1.0 reference: $checksum EOO } @@ -422,7 +424,7 @@ pkg_ctl="$prj_ctl/hello.git" $* "file:///$~/tgt.git" $data_dir >>"EOO" : 1 status: 200 - message: libhello/0.1.0 submission is queued + message: package submission is queued: libhello/0.1.0 reference: $checksum EOO } @@ -451,7 +453,7 @@ pkg_ctl="$prj_ctl/hello.git" $* "file:///$~/tgt.git" $root_ref_dir $data_dir >>"EOO" : 1 status: 200 - message: libhello/0.1.0 submission is queued + message: package submission is queued: libhello/0.1.0 reference: $checksum EOO } @@ -461,17 +463,36 @@ pkg_ctl="$prj_ctl/hello.git" : Test that the simulated submission still succeeds given no control URL. : { - $clone_root_data; - sed -i -e 's%^control: .+$%simulate: success%' $data_dir/request.manifest; - - $clone_root_tgt; - - $* "file:///$~/tgt.git" $data_dir >>"EOO" - : 1 - status: 200 - message: libhello/0.1.0 submission is queued - reference: $checksum - EOO + +$clone_root_data_clean + +sed -i -e 's%^control: .+$%simulate: success%' $data_dir/request.manifest + + : no-result-url + : + { + $clone_data; + $clone_root_tgt; + + $* "file:///$~/tgt.git" $data_dir >>"EOO" + : 1 + status: 200 + message: package submission is queued: libhello/0.1.0 + reference: $checksum + EOO + } + + : result-url + : + { + $clone_data; + $clone_root_tgt; + + $* --result-url 'https://example.com' "file:///$~/tgt.git" $data_dir >>"EOO" + : 1 + status: 200 + message: package submission is queued: https://example.com/libhello/0.1.0 + reference: $checksum + EOO + } } } -- cgit v1.1