Skip to content

Commit

Permalink
Add tests for checking the required services
Browse files Browse the repository at this point in the history
This way, merging pull requests that prevent services to be correctly
started up can be easily detected.

An example is issue openSUSE/open-build-service#3875.

Fixes os-autoinst#10.
  • Loading branch information
eduardoj committed Feb 10, 2020
1 parent 223505b commit 68067d9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/rspec_webui_tests.pm
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ sub run() {
assert_script_run("zypper -vv -n --gpg-auto-import-keys in --force-resolution --no-recommends $tests_packages libxml2-devel libxslt-devel ruby$ruby_version-devel", 600);
assert_script_run("git clone --single-branch --branch $branch --depth 1 https://github.com/openSUSE/open-build-service.git /tmp/open-build-service", 240);
assert_script_run("cd /tmp/open-build-service/dist/t");
assert_script_run("set -o pipefail; prove -v *-check_required_services.ts | tee /tmp/check_required_services_tests.txt");
assert_script_run("bundle.ruby$ruby_version install", 600);
assert_script_run("set -o pipefail; bundle.ruby$ruby_version exec rspec --format documentation | tee /tmp/rspec_tests.txt", 600);
save_screenshot;
upload_logs("/tmp/check_required_services_tests.txt");
upload_logs("/tmp/rspec_tests.txt");
}

Expand All @@ -29,6 +31,7 @@ sub test_flags() {
}

sub post_fail_hook {
upload_logs("/tmp/check_required_services_tests.txt", failok => 1);
upload_logs("/tmp/rspec_tests.txt", failok => 1);
script_run("tar cvfj /tmp/capybara_screens.tar.bz2 /tmp/rspec_screens/*");
upload_logs("/tmp/capybara_screens.tar.bz2", failok => 1);
Expand Down

0 comments on commit 68067d9

Please sign in to comment.