Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/containers/single_container_webui.pm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ sub run {
wait_for_container_log('openqa_webui', 'Web application available at', 'docker');

assert_script_run('curl http://localhost');
assert_script_run('docker rm -f openqa_webui');
#assert_script_run('docker rm -f openqa_webui');
}

sub post_fail_hook {
Expand Down
38 changes: 34 additions & 4 deletions tests/containers/worker.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,40 @@ use testapi;
use utils;

sub run {
my $volumes = '-v "/root/data/factory:/data/factory" -v "/root/data/tests:/data/tests" -v "/root/openQA/container/openqa_data/data.template/conf/:/data/conf:ro"';
assert_script_run("docker run -d --network testing $volumes --name openqa_worker openqa_worker");
wait_for_container_log('openqa_worker', 'API key and secret are needed', 'docker');
clear_root_console;
#my $apikey = '1234567890ABCDEF';
#my $apikey = '1234567890ABCDEF';
my $volumes = '-v "/root/data/factory:/data/factory" -v "/root/data/tests:/data/tests" -v "/root/openQA/container/openqa_data/data.template/conf/:/data/conf:ro"';
script_output(
"echo \"\$(cat <<EOF
[openqa_webui]
key = 1234567890ABCDEF
secret = 1234567890ABCDEF

[localhost]
key = 1234567890ABCDEF
secret = 1234567890ABCDEF
EOF
)\" > /root/openQA/container/openqa_data/data.template/conf/client.conf"
);
script_output(
"echo \"\$(cat <<EOF
[global]
BACKEND = qemu
HOST = http://openqa_webui
WORKER_HOSTNAME = openqa_worker
EOF
)\" > /root/openQA/container/openqa_data/data.template/conf/workers.ini"
);
assert_script_run("docker run -d --network testing $volumes --name openqa_worker openqa_worker");
my $expected_log = 'Failed to register';
wait_for_container_log('openqa_worker', 'Failed to register', 'docker');
record_info("$expected_log", 'https://progress.opensuse.org/issues/186651', result => 'softfail');
clear_root_console;
}

sub post_run_hook {
script_run('docker rm -f openqa_worker');
script_run('docker rm -f openqa_webui');
}

1;