Project

General

Profile

Actions

Bug #22840

open

Bats fails if re-ran after successful run

Added by Eric Helms about 6 years ago. Updated almost 6 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Our tests that run nightly run a series of tests in a brand new organization and then delete that organization at the end. So in theory, the tests are re-runnable over and over. With some patches from (https://community.theforeman.org/t/katello-nightly-breakage-dynflow-foreman-tasks-and-database/8559/8) the bats tests now successfully pass. However, if the bats tests are re-run there are validation errors that at first glance indicate that things are not being properly deleted. Here is an output of a re-run:

 ✓ Create an Empty Organization
 ✓ create an Organization
 ✓ create a product
 ✗ create package repository
   (in test file fb-content-katello.bats, line 35)
     `--url https://jlsherrill.fedorapeople.org/fake-repos/needed-errata/ | grep -q "Repository created"' failed
   Could not create the repository:
     Task 1078c984-cebf-4915-964e-198cac91ea9e: ActiveRecord::RecordInvalid: Validation failed: Label has already been taken
 ✗ upload package
   (in test file fb-content-katello.bats, line 41)
     `--product="${PRODUCT}" --name="${YUM_REPOSITORY}" --path="/tmp/animaniacs-0.1-1.noarch.rpm" | grep -q "Successfully uploaded"' failed
     % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                    Dload  Upload   Total   Spent    Left  Speed
100  4361  100  4361    0     0  23597      0 --:--:-- --:--:-- --:--:-- 23701
   warning: Overriding "Content-Type" header "multipart/form-data" with "multipart/form-data; boundary=----RubyFormBoundaryiuHwgOaWcxgUDLfT" due to payload
   Failed to upload file 'animaniacs-0.1-1.noarch.rpm' to repository. Please check the file and try again.
 ✗ sync repository
   (in test file fb-content-katello.bats, line 45)
     `hammer repository synchronize --organization="${ORGANIZATION}" \' failed with status 70
   Could not synchronize the repository:
     Required lock is already taken by other running tasks.
     Please inspect their state, fix their errors and resume them.

     Required lock: read
     Conflicts with tasks:
     - https://centos7-katello-bats-ci.woodford.example.com/foreman_tasks/tasks/1078c984-cebf-4915-964e-198cac91ea9e
 ✗ create puppet repository
   (in test file fb-content-katello.bats, line 51)
     `--product="${PRODUCT}" --content-type="puppet" --name "${PUPPET_REPOSITORY}" | grep -q "Repository created"' failed
   Could not create the repository:
     Task 7ca005d8-7be4-42a5-a5cd-9b9c09255f45: ActiveRecord::RecordInvalid: Validation failed: Label has already been taken
 ✗ upload puppet module
   (in test file fb-content-katello.bats, line 58)
     `--path="/tmp/stbenjam-dummy-0.2.0.tar.gz" | grep -q "Successfully uploaded"' failed
     % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                    Dload  Upload   Total   Spent    Left  Speed
100  2059    0  2059    0     0   3132      0 --:--:-- --:--:-- --:--:--  3129
   warning: Overriding "Content-Type" header "multipart/form-data" with "multipart/form-data; boundary=----RubyFormBoundary8n8gwBF0j1Wn9O1d" due to payload
   Failed to upload file 'stbenjam-dummy-0.2.0.tar.gz' to repository. Please check the file and try again.

One thing I noticed is the failure is in this step:

Actions::Katello::Product::ContentCreate

Actions #1

Updated by Andrew Kofink about 6 years ago

  • translation missing: en.field_release set to 114
Actions

Also available in: Atom PDF