Editing integration tests

Once you have added an Integration Test Scenario to Konflux, you may want to change the configurations for it.

Prerequisites
Procedure

Complete the following steps in the Konflux console:

  1. Open an existing application and go to the Integration tests tab.

  2. Select the three dots on the right side of the table.

  3. Select the Edit action.

  4. Make any changes to the test that are needed

    • Modify the GitHub URL if you need to specify a different repository.

    • Modify the Revision if you need to use a different branch, tag, or commit in the repository.

    • Modify the Path in repository to point to a new location for the .yaml file.

    • Add or remove Parameters which are passed to the integration test scenario.

    • Modify whether this integration test scenario is required or optional for release.

    A failing integration test marks the application snapshot as failed. A failing required test will prevent the automated release. If you have selected Mark as optional for release, a failure in this test will still result in an automated release of the application snapshot.
  5. Select Save changes.

  6. To start building a new component (and afterwards trigger a new integration test), either open a new pull request (PR) that targets the tracked branch of a component in the application, or comment '/retest' on an existing PR.

Configuring the enterprise contract policy

All applications created in Konflux will have one integration test scenario to enable manage compliance with Enterprise Contract by default. You can configure your tests to use a customized Kubernetes Custom Resource policy on the cluster.

Procedure

Complete the following steps in the Konflux console:

  1. Open an existing application and go to the Integration tests tab.

  2. Select the three dots on the right side of the table.

  3. Select the Edit action.

  4. Click on Add parameter.

    • In Name, write POLICY_CONFIGURATION

    • In Value, write the namespace and CR name for the policy, <namespace>/<policy-name>

  5. Click on Save changes.

  6. To start building a new component (and afterwards trigger a new integration test), either open a new pull request (PR) that targets the tracked branch of a component in the application, or comment '/retest' on an existing PR.

Verification

When the new build is finished:

  1. Go to the Integration tests tab and select the highlighted name of your test.

  2. Go to the Pipeline runs tab of that test and select the most recent run.

  3. On the Details page, you can see if the test succeeded for that component. The policy used by the test should be updated.