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

feat(STONEINTG-702): add tests for integration pipeline re-runs #934

Merged
merged 2 commits into from
Dec 14, 2023

Conversation

dirgim
Copy link
Contributor

@dirgim dirgim commented Dec 6, 2023

  • The integration service recreates a new Integration PipelineRun based on the value of the test.appstudio.openshift.io/run label on a Snapshot
  • This change adds e2e tests for the new functionality by adding the label in integration e2e tests and observing the retriggered pipelineRun is handled correctly

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.

Issue ticket number and link

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added meaningful description with JIRA/GitHub issue key(if applicable), for example HASSuiteDescribe("STONE-123456789 devfile source")
  • I have updated labels (if needed)

@openshift-ci openshift-ci bot requested review from jsztuka and rcerven December 6, 2023 15:37
@dirgim dirgim marked this pull request as draft December 6, 2023 15:38
@dirgim dirgim marked this pull request as ready for review December 7, 2023 10:07
@openshift-ci openshift-ci bot requested review from 14rcole and jinqi7 December 7, 2023 10:07
@dirgim dirgim marked this pull request as draft December 7, 2023 10:07
@dirgim
Copy link
Contributor Author

dirgim commented Dec 7, 2023

/test redhat-appstudio-e2e

@dirgim dirgim changed the title WIP: feat(STONEINTG-702): add tests for integration pipeline re-runs feat(STONEINTG-702): add tests for integration pipeline re-runs Dec 11, 2023
@dirgim
Copy link
Contributor Author

dirgim commented Dec 11, 2023

/test redhat-appstudio-e2e

@dirgim
Copy link
Contributor Author

dirgim commented Dec 11, 2023

/test redhat-appstudio-e2e

@dirgim
Copy link
Contributor Author

dirgim commented Dec 12, 2023

/test redhat-appstudio-e2e

@dirgim dirgim marked this pull request as ready for review December 12, 2023 10:11
@dirgim dirgim requested review from MartinBasti and psturc and removed request for MartinBasti December 12, 2023 10:11
@openshift-ci openshift-ci bot requested review from 14rcole and mkosiarc December 12, 2023 10:11
@dirgim dirgim requested a review from MartinBasti December 12, 2023 10:11
Copy link
Member

@psturc psturc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

couple of comments - I think some changes are required in order to get e2e job to pass, otherwise lgtm

tests/integration-service/integration.go Outdated Show resolved Hide resolved
tests/integration-service/integration.go Outdated Show resolved Hide resolved
tests/integration-service/integration.go Outdated Show resolved Hide resolved
tests/integration-service/namespace-backed-environments.go Outdated Show resolved Hide resolved
tests/integration-service/namespace-backed-environments.go Outdated Show resolved Hide resolved
@dirgim
Copy link
Contributor Author

dirgim commented Dec 13, 2023

/test redhat-appstudio-e2e

@dirgim
Copy link
Contributor Author

dirgim commented Dec 13, 2023

/test redhat-appstudio-e2e

Copy link
Member

@dheerajodha dheerajodha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some minor comments, otherwise lgtm

tests/integration-service/integration.go Outdated Show resolved Hide resolved
tests/integration-service/integration.go Outdated Show resolved Hide resolved
tests/integration-service/namespace-backed-environments.go Outdated Show resolved Hide resolved
tests/integration-service/namespace-backed-environments.go Outdated Show resolved Hide resolved
tests/integration-service/namespace-backed-environments.go Outdated Show resolved Hide resolved
tests/integration-service/integration.go Outdated Show resolved Hide resolved
Expect(metadata.GetLabelsWithPrefix(updatedSnapshot, snapshotRerunLabel)).NotTo(BeEmpty())
})

When("An snapshot is updated with a rerun label for a given scenario", func() {
Copy link
Contributor

@jsztuka jsztuka Dec 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I see re-run in previous It statement, should we unify this?
I'm for team re-run.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack, updated to use re-run everywhere.

* The integration service recreates a new Integration PipelineRun
  based on the value of the test.appstudio.openshift.io/run=<ITSName>
  label on a Snapshot
* This change adds e2e tests for the new functionality by
  adding the label in integration e2e tests and observing the
  retriggered pipelineRun is handled correctly

Signed-off-by: dirgim <[email protected]>
* This change adds e2e tests for the new functionality by
  adding the label in integration namespace-backed environment
  e2e tests and observing the retriggered pipelineRun
  is handled correctly

Signed-off-by: dirgim <[email protected]>
Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.5% Duplication on New Code

See analysis details on SonarCloud

@dheerajodha
Copy link
Member

/lgtm

Copy link
Contributor

@jsztuka jsztuka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@dheerajodha dheerajodha requested a review from psturc December 14, 2023 16:59
@psturc
Copy link
Member

psturc commented Dec 14, 2023

/approve

Copy link

openshift-ci bot commented Dec 14, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jsztuka, MartinBasti, psturc

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

The pull request process is described here

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-merge-bot openshift-merge-bot bot merged commit 9eff086 into konflux-ci:main Dec 14, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants