Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-28411

Resolve flaky BATS composite CV test

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • None
    • None
    • None
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • 0
    • Phoenix
    • Sprint 140
    • None

      BATS sometimes fails with an error checking modular content in a published composite content view version. This could be a bug and it also disrupts the build pipeline.

      Run through the BATS steps manually and try to determine how the error is possible. It is difficult to reproduce naturally via the pipelines.

      Last reproduced via `ansible-playbook pipelines/satellite_install_pipeline.yml -e forklift_state=up -e pipeline_type=satellite -e pipeline_version=6.16 -e pipeline_os=rhel9`

      Error:

      not ok 47 ensure component cv 1 latest version has proper content

      1. (in test file fb-katello-content.bats, line 382)
      1. `diff cvv_content_modulemds fixtures/component_1_modulemds' failed
      1. $ [fb-katello-content.bats, line 11]
      1. $ HOSTNAME=$(hostname -f)
      1. $ hostname -f
      1. $ "$@"
      1. $ cvv_id=$(hammer --csv --no-headers content-view version list --organization="${ORGANIZATION}" | grep "${CONTENT_VIEW_2} 1.1" | cut -d, -f1)
      1. $ hammer --csv --no-headers content-view version list --organization="${ORGANIZATION}"
      1. $ grep "${CONTENT_VIEW_2} 1.1"
      1. $ cut -d, -f1
      1. $ hammer package list --content-view-version-id=$cvv_id --order='name DESC' --fields='filename' > cvv_content_rpms
      1. $ diff cvv_content_rpms fixtures/component_1_rpms
      1. $ hammer erratum list --content-view-version-id=$cvv_id --order='id' --fields='Errata ID' > cvv_content_errata
      1. $ diff cvv_content_errata fixtures/component_1_errata
      1. $ hammer module-stream list --content-view-version-id=$cvv_id --order='stream id' --fields="module stream name,stream,version,architecture,context" > cvv_content_modulemds
      1. $ diff cvv_content_modulemds fixtures/component_1_modulemds
      1. 1,5c1,5
      1. < ------------------|------|---------------|------------|--------
      1. < MODULE STREAM NAME | STREAM | VERSION | ARCHITECTURE | CONTEXT
      1. < ------------------|------|---------------|------------|--------
      1. < duck | 0 | 201809302113907 | noarch | deadbeef
      1. < ------------------|------|---------------|------------|--------
      1. > ------------------|------|--------------|------------|--------
      1. > MODULE STREAM NAME | STREAM | VERSION | ARCHITECTURE | CONTEXT
      1. > ------------------|------|--------------|------------|--------
      1. > walrus | 5.21 | 20180704144203 | x86_64 | deadbeef
      1. > ------------------|------|--------------|------------|--------

      ok 48 ensure component cv 2 latest version has proper content

      not ok 49 ensure composite cv latest version has proper content

      1. (in test file fb-katello-content.bats, line 427)
      1. `diff cvv_content_modulemds_composite fixtures/composite_modulemds' failed
      1. $ [fb-katello-content.bats, line 11]
      1. $ HOSTNAME=$(hostname -f)
      1. $ hostname -f
      1. $ "$@"
      1. $ cvv_id=$(hammer --csv --no-headers content-view version list --organization="${ORGANIZATION}" | grep "${CONTENT_VIEW_3} 1.1" | cut -d, -f1)
      1. $ hammer --csv --no-headers content-view version list --organization="${ORGANIZATION}"
      1. $ grep "${CONTENT_VIEW_3} 1.1"
      1. $ cut -d, -f1
      1. $ hammer package list --content-view-version-id=$cvv_id --order='name DESC' --fields='filename'
      1. $ awk '!seen[$0]++' > cvv_content_rpms_composite
      1. $ diff -w cvv_content_rpms_composite fixtures/composite_rpms
      1. $ hammer erratum list --content-view-version-id=$cvv_id --order='id' --fields='Errata ID' > cvv_content_errata_composite
      1. $ diff cvv_content_errata_composite fixtures/composite_errata
      1. $ hammer module-stream list --content-view-version-id=$cvv_id --order='stream id' --fields="module stream name,stream,version,architecture,context" > cvv_content_modulemds_composite
      1. $ diff cvv_content_modulemds_composite fixtures/composite_modulemds
      1. 1,5c1,5
      1. < ------------------|------|---------------|------------|--------
      1. < MODULE STREAM NAME | STREAM | VERSION | ARCHITECTURE | CONTEXT
      1. < ------------------|------|---------------|------------|--------
      1. < duck | 0 | 201809302113907 | noarch | deadbeef
      1. < ------------------|------|---------------|------------|--------
      1. > ------------------|------|--------------|------------|--------
      1. > MODULE STREAM NAME | STREAM | VERSION | ARCHITECTURE | CONTEXT
      1. > ------------------|------|--------------|------------|--------
      1. > walrus | 5.21 | 20180704144203 | x86_64 | deadbeef
      1. > ------------------|------|--------------|------------|--------

       

            Unassigned Unassigned
            iballou@redhat.com Ian Ballou
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: