Skip to content

Commit d6e8f26

Browse files
committed
Support short test urls in openqa-clone-custom-git-refspec
1 parent d10b7ba commit d6e8f26

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

script/openqa-clone-custom-git-refspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ clone_job() {
136136
local job_url="${1:?"Need 'job_url' parameter"}"
137137
local host=${job_url%%/t*}
138138
local job=${job_url##*/}
139+
job=${job##t}
139140
fi
140141
if [[ -z "$testsuite" ]] || [[ -z "$productdir" ]]; then
141142
local json_url=${host}/tests/${job}/file/vars.json

t/40-script_openqa-clone-custom-git-refspec.t

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,12 @@ $expected_re = qr/TEST1=BLUB\r?\nTEST2=\$VAR\r?\nTEST3=space space\r?\nTEST4=\(!
7575
combined_like { run_once($args_escape, q(dry_run='printf "%s\n"')) } $expected_re,
7676
'Custom variables has proper bash escaping';
7777

78-
TODO: {
79-
local $TODO = 'not implemented';
78+
subtest 'short urls' => sub {
8079
$args = 'https://github.com/user/repo/pull/9128 https://openqa.opensuse.org/t1234';
8180
test_once $args, qr/${expected}/, 'short test URLs are supported the same';
8281
$args .= ',https://openqa.suse.de/t1234';
8382
test_once $args, qr/${expected}.* 1234/s, 'multiple short URLs from different hosts point to individual hosts';
84-
}
83+
};
8584

8685
my $test_url = 'https://openqa.opensuse.org/tests/1107158';
8786
$ENV{curl_github} = qq{echo -e '{"head": {"label": "user:my_branch"}, "body": "\@openqa: Clone ${test_url}"}'; true};

0 commit comments

Comments
 (0)