Skip to content

Commit 5922663

Browse files
Merge pull request #25975 from ricardobranco777/helm
helm: Apply work-around for gh#OSInside/flake-pilot#80
2 parents 4c9ae0e + 0750a5e commit 5922663

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

tests/containers/helm.pm

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@ sub run {
5454
add_suseconnect_product(get_addon_fullname('pcm')) if is_sle("<16");
5555
my $aws_cli_pkg = is_sle(">16.0") ? 'aws-cli-cmd' : 'aws-cli';
5656
zypper_call("in jq $aws_cli_pkg", timeout => 300);
57+
if (is_sle(">16.0")) {
58+
# Wrap aws to suppress flake-pilot stderr noise
59+
# https://github.com/OSInside/flake-pilot/issues/80
60+
my $aws_bin = script_output("command -v aws");
61+
assert_script_run("printf '#!/bin/sh\\nexec $aws_bin %%silent \"\$\@\"\\n' > /usr/local/bin/aws && chmod +x /usr/local/bin/aws");
62+
assert_script_run('export PATH=/usr/local/bin:$PATH');
63+
}
5764

5865
# publiccloud::aws_client needs to demand PUBLIC_CLOUD_REGION due to other places where
5966
# we don't want to have defaults and want tests to fail when region is not defined
@@ -71,6 +78,15 @@ sub run {
7178
add_suseconnect_product(get_addon_fullname('phub')) if is_sle('=12-sp5');
7279
my $az_cli_pkg = is_sle(">16.0") ? 'az-cli-cmd' : 'azure-cli';
7380
zypper_call("in jq $az_cli_pkg", timeout => 300);
81+
if (is_sle(">16.0")) {
82+
# Wrap az to suppress flake-pilot stderr noise
83+
# https://github.com/OSInside/flake-pilot/issues/80
84+
my $az_bin = script_output("command -v az");
85+
assert_script_run("printf '#!/bin/sh\\nexec $az_bin %%silent \"\$\@\"\\n' > /usr/local/bin/az && chmod +x /usr/local/bin/az");
86+
assert_script_run('export PATH=/usr/local/bin:$PATH');
87+
}
88+
89+
# publiccloud::aws_client needs to demand PUBLIC_CLOUD_REGION due to other places where
7490

7591
# publiccloud::azure_client needs to demand PUBLIC_CLOUD_REGION due to other places where
7692
# we don't want to have defaults and want tests to fail when region is not defined

0 commit comments

Comments
 (0)