Skip to content

USHIFT-7223: Automate Polarion tests OCP-66820 and OCP-66882#6905

Open
agullon wants to merge 4 commits into
openshift:mainfrom
agullon:USHIFT-7223
Open

USHIFT-7223: Automate Polarion tests OCP-66820 and OCP-66882#6905
agullon wants to merge 4 commits into
openshift:mainfrom
agullon:USHIFT-7223

Conversation

@agullon

@agullon agullon commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add Robot Framework tests for two prerun data management scenarios in test/suites/backup/prerun-data-management.robot
  • OCP-66820: Verifies that modifying the version file to be 3 minors back causes MicroShift to fail and log the failure reason to prerun_failed.log, reported by greenboot healthcheck
  • OCP-66882: Verifies that removing /var/lib/microshift while health.json shows healthy causes MicroShift to start fresh, ignoring stale health info
  • Both tests added to existing CI scenarios (el98-src@backup-and-restore-on-reboot.sh and el98-lrel@backups.sh)

Test plan

  • Run el98-src@backup-and-restore-on-reboot presubmit scenario — verify both existing and new tests pass
  • Run el98-lrel@backups release scenario — verify both existing and new tests pass
  • Verify OCP-66820 test correctly detects version mismatch failure in prerun_failed.log
  • Verify OCP-66882 test correctly detects fresh start journal messages after data removal

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Expanded automated coverage for backup/restore-on-reboot and release backup flows by running an additional prerun data management Robot suite alongside the existing backup-related scenarios.
    • Added end-to-end validations for prerun behavior, including version-file compatibility handling with healthcheck completion status and journal/log assertions for expected failure or recovery messaging.
    • Verifies “fresh start” behavior when the MicroShift data directory is removed while persisted system health remains healthy, including expected journal indications after reboot.

Add Robot Framework tests for prerun data management scenarios:

- OCP-66820: Verify that when the version file indicates a version
  3 minors behind the executable (exceeding MAX_VERSION_SKEW=2),
  MicroShift fails to start and logs the failure reason to
  prerun_failed.log, which is then reported by greenboot healthcheck.

- OCP-66882: Verify that when the MicroShift data directory is removed
  but health.json shows healthy status, MicroShift starts fresh as if
  it were the first run, ignoring the stale health info.

Both tests are added to existing CI scenarios:
- Presubmit: el98-src@backup-and-restore-on-reboot.sh
- Release: el98-lrel@backups.sh

Ref: USHIFT-7223

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

pre-commit.check-secrets: ENABLED
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 18, 2026
@openshift-ci-robot

openshift-ci-robot commented Jun 18, 2026

Copy link
Copy Markdown

@agullon: This pull request references USHIFT-7223 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

  • Add Robot Framework tests for two prerun data management scenarios in test/suites/backup/prerun-data-management.robot
  • OCP-66820: Verifies that modifying the version file to be 3 minors back causes MicroShift to fail and log the failure reason to prerun_failed.log, reported by greenboot healthcheck
  • OCP-66882: Verifies that removing /var/lib/microshift while health.json shows healthy causes MicroShift to start fresh, ignoring stale health info
  • Both tests added to existing CI scenarios (el98-src@backup-and-restore-on-reboot.sh and el98-lrel@backups.sh)

Test plan

  • Run el98-src@backup-and-restore-on-reboot presubmit scenario — verify both existing and new tests pass
  • Run el98-lrel@backups release scenario — verify both existing and new tests pass
  • Verify OCP-66820 test correctly detects version mismatch failure in prerun_failed.log
  • Verify OCP-66882 test correctly detects fresh start journal messages after data removal

🤖 Generated with Claude Code

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 37fd5f95-0527-43e6-b8d7-05aaf12a0665

📥 Commits

Reviewing files that changed from the base of the PR and between 143d82c and 8be3c4c.

📒 Files selected for processing (1)
  • test/suites/backup/prerun-data-management.robot
🚧 Files skipped from review as they are similar to previous changes (1)
  • test/suites/backup/prerun-data-management.robot

Walkthrough

A new Robot Framework test suite prerun-data-management.robot validates two MicroShift prerun recovery scenarios: version-file-too-old (expecting greenboot failure and prerun_failed.log) and missing data directory (expecting fresh-start journal messages). Two CI scenario scripts are updated to include the suite in their test runs.

Changes

Prerun Data Management Tests

Layer / File(s) Summary
Scenario script integration
test/scenarios/presubmits/el98-src@backup-and-restore-on-reboot.sh, test/scenarios/releases/el98-lrel@backups.sh
Both scenario_run_tests functions expand their run_tests host1 calls to include suites/backup/prerun-data-management.robot alongside existing suites.
Suite structure and foundation
test/suites/backup/prerun-data-management.robot
Suite-level imports, documentation, tags, filesystem path variables, and host login/logout setup/teardown keywords are defined.
Test cases and support keywords
test/suites/backup/prerun-data-management.robot
Two test scenarios stop MicroShift, apply version manipulation or data-directory removal, reboot, wait for greenboot completion, and assert journal and log outcomes. Keywords support version-file backup/edit via jq, greenboot state polling, journald content assertions, prerun_failed.log validation, backup-directory presence, persisted health checks, data-directory deletion with fresh-start verification, and conditional MicroShift startup.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly references the Jira issue (USHIFT-7223) and accurately describes the main objective: automating two specific Polarion tests (OCP-66820 and OCP-66882) for MicroShift's prerun data management functionality.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed PR adds only Robot Framework tests (prerun-data-management.robot) with stable, descriptive names ("Prerun Failure Is Logged When Version Is Too Old", "Data Missing With Healthy Status Starts Fresh"...
Test Structure And Quality ✅ Passed Check is designed for Ginkgo/Go tests but PR contains Robot Framework tests only. Robot Framework tests follow appropriate patterns: single responsibility, proper setup/teardown, timeouts included...
Microshift Test Compatibility ✅ Passed Check scoped to Ginkgo e2e tests. PR adds Robot Framework tests (.robot files), not Ginkgo tests. Check not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed Custom check does not apply. The PR adds Robot Framework tests (.robot files), not Ginkgo e2e tests. The check explicitly targets Ginkgo tests with Go syntax patterns.
Topology-Aware Scheduling Compatibility ✅ Passed PR adds test automation and Robot Framework test suites only; no deployment manifests, operator code, or scheduling constraints are introduced.
Ote Binary Stdout Contract ✅ Passed PR contains only Robot Framework tests and Bash scripts; no OTE/Go/Ginkgo binary code affected by stdout contract requirements.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The custom check applies to Ginkgo e2e tests (It(), Describe(), etc.), but this PR adds Robot Framework tests and shell scripts, which are outside the check's scope.
No-Weak-Crypto ✅ Passed No weak crypto, custom crypto implementations, or non-constant-time secret comparisons detected in the PR's Robot test files and scenario scripts.
Container-Privileges ✅ Passed PR contains only test scripts and Robot Framework test suites, not container or K8s manifests; no privileged container patterns found.
No-Sensitive-Data-In-Logs ✅ Passed The PR adds Robot Framework tests that execute system commands and capture output into variables, but do not explicitly log sensitive data. All executed commands output non-sensitive information: s...

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci Bot requested review from ggiguash and jogeo June 18, 2026 14:40
@openshift-ci

openshift-ci Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: agullon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 18, 2026
@agullon

agullon commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

/retest

agullon added 2 commits June 19, 2026 11:00
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

pre-commit.check-secrets: ENABLED
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

pre-commit.check-secrets: ENABLED
@agullon

agullon commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

/retest

- Add Make New SSH Connection to Greenboot Health Check Should Be
  Finished keyword to survive greenboot-triggered reboots during
  the retry loop (SSH connection dies on each reboot)
- Add initial reboot to OCP-66882 test to ensure a backup exists
  before testing fresh start behavior, matching Polarion step 1

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

pre-commit.check-secrets: ENABLED
@openshift-ci

openshift-ci Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

@agullon: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-tests-bootc-release-el10 8be3c4c link true /test e2e-aws-tests-bootc-release-el10
ci/prow/e2e-aws-tests-bootc-release-arm-el9 8be3c4c link true /test e2e-aws-tests-bootc-release-arm-el9
ci/prow/e2e-aws-tests-arm 8be3c4c link true /test e2e-aws-tests-arm
ci/prow/e2e-aws-tests-bootc-release-el9 8be3c4c link true /test e2e-aws-tests-bootc-release-el9
ci/prow/e2e-aws-tests-release-arm 8be3c4c link true /test e2e-aws-tests-release-arm
ci/prow/e2e-aws-tests-bootc-release-arm-el10 8be3c4c link true /test e2e-aws-tests-bootc-release-arm-el10

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants