Skip to content

Commit

Permalink
Use variable name which shows where is taken from
Browse files Browse the repository at this point in the history
needles_dir takes a value which shows to the product dir. This changes tries
to make a better presentation on the value which is pass to the NEEDLES_DIR.

Signed-off-by: ybonatakis <[email protected]>
  • Loading branch information
b10n1k committed Jul 31, 2024
1 parent 7254f2b commit 0e4b252
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions t/40-script_openqa-clone-custom-git-refspec.t
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,17 @@ $ENV{curl_github} = qq{echo -e '{"head": {"label": "user:my/branch"}, "body": "L
my $needles = 'products/sle/needles';
$ENV{curl_openqa}
= qq{echo -e '{"TEST": "my_test", "CASEDIR": "my/distri", "PRODUCTDIR": "distri/products/sle", "NEEDLES_DIR": "$needles"}'; true};
$dirs = "CASEDIR=https://github.com/user/repo.git#my/branch PRODUCTDIR=repo/products/sle NEEDLES_DIR=distri/$needles";
$dirs
= "CASEDIR=https://github.com/user/repo.git#my/branch PRODUCTDIR=repo/products/sle NEEDLES_DIR=$needles";
$expected = $clone_job . '1169326 _GROUP=0 TEST\+=\@user/repo#my/branch BUILD=user/repo#9539 ';
$expected_re = qr/${expected}${dirs}/;
test_once $args, $expected_re, "PRODUCTDIR is correct when the source job's PRODUCTDIR is a relative directory";

$needles = "$needles";
$ENV{curl_openqa}
= qq{echo -e '{"TEST": "my_test", "CASEDIR": "/my/distri", "PRODUCTDIR": "products/sle", "NEEDLES_DIR": "$needles"}'; true};
$dirs = "CASEDIR=https://github.com/user/repo.git#my/branch PRODUCTDIR=repo/products/sle NEEDLES_DIR=$needles";
$dirs
= "CASEDIR=https://github.com/user/repo.git#my/branch PRODUCTDIR=repo/products/sle NEEDLES_DIR=$needles";
$expected_re = qr/${expected}${dirs}/;
test_once $args, $expected_re, 'Correct PRODUCTDIR for relative non-prefixed dir';

Expand All @@ -128,7 +130,8 @@ test_once $args, $expected_re, "PRODUCTDIR is correct when the source job's PROD

$ENV{curl_openqa}
= qq{echo -e '{"TEST": "my_test", "CASEDIR": "https://github.com/user/repo", "PRODUCTDIR": "products/sle"}'; true};
$dirs = "CASEDIR=https://github.com/user/repo.git#my/branch PRODUCTDIR=repo/products/sle NEEDLES_DIR=$needles";
$dirs
= "CASEDIR=https://github.com/user/repo.git#my/branch PRODUCTDIR=repo/products/sle NEEDLES_DIR=$needles";
$expected_re = qr/${expected}${dirs}/;
test_once $args, $expected_re, 'Correct NEEDLES_DIR when variable is not set';

Expand Down

0 comments on commit 0e4b252

Please sign in to comment.