Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testsuite: fix container proxy test cleanup #7586

Merged
merged 1 commit into from
Sep 29, 2023

Conversation

cbosdo
Copy link
Contributor

@cbosdo cbosdo commented Sep 26, 2023

What does this PR change?

The config file to clean is no longer a zip, but a tar.gz. The missing file test fails in container server CI, but is ignored in master:

Screenshot from 2023-09-26 13-38-58

GUI diff

No difference.

  • DONE

Documentation

  • No documentation needed: only internal and user invisible changes

  • DONE

Test coverage

  • Cucumber tests were fixed

  • DONE

Links

Fixes #
Tracks # add downstream PR, if any

  • DONE

Changelogs

Make sure the changelogs entries you are adding are compliant with https://github.com/uyuni-project/uyuni/wiki/Contributing#changelogs and https://github.com/uyuni-project/uyuni/wiki/Contributing#uyuni-projectuyuni-repository

If you don't need a changelog check, please mark this checkbox:

  • No changelog needed

If you uncheck the checkbox after the PR is created, you will need to re-run changelog_test (see below)

Re-run a test

If you need to re-run a test, please mark the related checkbox, it will be unchecked automatically once it has re-run:

  • Re-run test "changelog_test"
  • Re-run test "backend_unittests_pgsql"
  • Re-run test "java_pgsql_tests"
  • Re-run test "schema_migration_test_pgsql"
  • Re-run test "susemanager_unittests"
  • Re-run test "javascript_lint"
  • Re-run test "spacecmd_unittests"

The config file to clean is no longer a zip, but a tar.gz
@cbosdo cbosdo added the ready PR ready, waiting branch is unlocked label Sep 26, 2023
@srbarrios
Copy link
Member

Thanks for the quick fix Cédric!
I think the next PR to make this more reliable is to change:

When(/^I remove "([^"]*)" from "([^"]*)"$/) do |filename, host|
  node = get_target(host)
  file_delete(node, filename)
end

By something like:

When(/^I remove "([^"]*)" from "([^"]*)"$/) do |filename, host|
  node = get_target(host)
  raise "File #{filename} not removed properly." unless file_delete(node, filename).zero?
end

@cbosdo
Copy link
Contributor Author

cbosdo commented Sep 28, 2023

Thanks for the quick fix Cédric! I think the next PR to make this more reliable is to change:

When(/^I remove "([^"]*)" from "([^"]*)"$/) do |filename, host|
  node = get_target(host)
  file_delete(node, filename)
end

By something like:

When(/^I remove "([^"]*)" from "([^"]*)"$/) do |filename, host|
  node = get_target(host)
  raise "File #{filename} not removed properly." unless file_delete(node, filename).zero?
end

I agree, but I didn't want to take that responsability as I have no clue what errors that could bring up!

@srbarrios
Copy link
Member

Thanks for the quick fix Cédric! I think the next PR to make this more reliable is to change:

When(/^I remove "([^"]*)" from "([^"]*)"$/) do |filename, host|
  node = get_target(host)
  file_delete(node, filename)
end

By something like:

When(/^I remove "([^"]*)" from "([^"]*)"$/) do |filename, host|
  node = get_target(host)
  raise "File #{filename} not removed properly." unless file_delete(node, filename).zero?
end

I agree, but I didn't want to take that responsability as I have no clue what errors that could bring up!

Sure, no worries, the quick fix should be enough for now.

@cbosdo cbosdo merged commit 1d387f4 into uyuni-project:master Sep 29, 2023
10 of 11 checks passed
@cbosdo cbosdo deleted the test-container-fix branch September 29, 2023 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready PR ready, waiting branch is unlocked ruby_rubocop secondary-features testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants