Skip to content

Commit

Permalink
feat(STONEINTG-697): remove SEB case created for successful snapshot (#…
Browse files Browse the repository at this point in the history
…1125)

feat(STONEINTG-697): remove SEB case for successful snapshot

* Remove the check points for SEB created for successful snapshot
  since integration stop deloying successful snapshot to root env
* Remove SEB from integration README

Signed-off-by: Hongwei Liu <[email protected]>
  • Loading branch information
hongweiliu17 authored Apr 22, 2024
1 parent 4085661 commit 5fc0d33
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 29 deletions.
3 changes: 1 addition & 2 deletions tests/integration-service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ Happy path testing describes tests that focus on the most common scenarios while
- Checking that the status of integration tests were reported to the Snapshot.
- Checking that a snapshot gets successfully marked as 'passed' after all Integration pipeline runs finished.
- Validating the Global Candidate is updated
- Validating the successful creation of a SnapshotEnvironmentBinding.
- Validating the successful creation of a Release.

### E2E tests of Status Reporting of Integration tests to CheckRuns (within `status-reporting-to-pullrequest.go`):
Expand Down Expand Up @@ -45,7 +44,7 @@ Happy path testing describes tests that focus on the most common scenarios while
- Validating that a new Integration PLR is created and finished.
- Asserting that the Snapshot doesn't contain re-run label, and contains the name of re-triggered pipelinerun.
- Asserting that a snapshot is still marked as failed.
- Validating that no Release CRs and no SnapshotEnvironmentBinding are created in certain scenarios.
- Validating that no Release CRs is created in certain scenarios.
- Checking that the global candidate does not get updated unexpectedly.


Expand Down
28 changes: 1 addition & 27 deletions tests/integration-service/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ var _ = framework.IntegrationServiceSuiteDescribe("Integration Service E2E tests
var pipelineRun *pipeline.PipelineRun
var snapshot *appstudioApi.Snapshot
var snapshotPush *appstudioApi.Snapshot
var env *appstudioApi.Environment
AfterEach(framework.ReportFailure(&f))

Describe("with happy path for general flow of Integration service", Ordered, func() {
Expand All @@ -57,7 +56,6 @@ var _ = framework.IntegrationServiceSuiteDescribe("Integration Service E2E tests
cleanup(*f, testNamespace, applicationName, componentName)

Expect(f.AsKubeAdmin.IntegrationController.DeleteSnapshot(snapshotPush, testNamespace)).To(Succeed())
Expect(f.AsKubeAdmin.GitOpsController.DeleteAllEnvironmentsInASpecificNamespace(EnvironmentName, time.Minute*5)).To(Succeed())
}
})

Expand Down Expand Up @@ -138,11 +136,9 @@ var _ = framework.IntegrationServiceSuiteDescribe("Integration Service E2E tests
})
})

It("creates a ReleasePlan and an environment", func() {
It("creates a ReleasePlan", func() {
_, err = f.AsKubeAdmin.ReleaseController.CreateReleasePlan(autoReleasePlan, testNamespace, applicationName, targetReleaseNamespace, "")
Expect(err).ShouldNot(HaveOccurred())
env, err = f.AsKubeAdmin.GitOpsController.CreatePocEnvironment(EnvironmentName, testNamespace)
Expect(err).ShouldNot(HaveOccurred())
testScenarios, err := f.AsKubeAdmin.IntegrationController.GetIntegrationTestScenarios(applicationName, testNamespace)
Expect(err).ShouldNot(HaveOccurred())
for _, testScenario := range *testScenarios {
Expand Down Expand Up @@ -186,15 +182,6 @@ var _ = framework.IntegrationServiceSuiteDescribe("Integration Service E2E tests
return err
}, timeout, interval).Should(Succeed(), fmt.Sprintf("time out when waiting for release created for snapshot %s/%s", snapshotPush.GetNamespace(), snapshotPush.GetName()))
})

It("checks if an SnapshotEnvironmentBinding is created successfully", func() {
timeout = time.Second * 600
interval = time.Second * 2
Eventually(func() error {
_, err := f.AsKubeAdmin.CommonController.GetSnapshotEnvironmentBinding(applicationName, testNamespace, env)
return err
}, timeout, interval).Should(Succeed(), fmt.Sprintf("timed out when waiting for SnapshotEnvironmentBinding to be created for application %s/%s", testNamespace, applicationName))
})
})
})

Expand All @@ -208,8 +195,6 @@ var _ = framework.IntegrationServiceSuiteDescribe("Integration Service E2E tests
applicationName = createApp(*f, testNamespace)
componentName, originalComponent = createComponent(*f, testNamespace, applicationName)

env, err = f.AsKubeAdmin.GitOpsController.CreatePocEnvironment(EnvironmentName, testNamespace)
Expect(err).ShouldNot(HaveOccurred())
integrationTestScenario, err = f.AsKubeAdmin.IntegrationController.CreateIntegrationTestScenario(applicationName, testNamespace, gitURL, revision, pathInRepoFail)
Expect(err).ShouldNot(HaveOccurred())
})
Expand All @@ -218,7 +203,6 @@ var _ = framework.IntegrationServiceSuiteDescribe("Integration Service E2E tests
if !CurrentSpecReport().Failed() {
cleanup(*f, testNamespace, applicationName, componentName)

Expect(f.AsKubeAdmin.GitOpsController.DeleteAllEnvironmentsInASpecificNamespace(EnvironmentName, time.Minute*5)).To(Succeed())
}
})

Expand Down Expand Up @@ -348,16 +332,6 @@ var _ = framework.IntegrationServiceSuiteDescribe("Integration Service E2E tests
Expect(releases.Items).To(BeEmpty(), "Expected no Release CRs to be present, but found some")
})

It("checks no SnapshotEnvironmentBinding is created", func() {
seb, err := f.AsKubeAdmin.CommonController.GetSnapshotEnvironmentBinding(applicationName, testNamespace, env)

if err != nil {
Expect(err.Error()).To(ContainSubstring("no SnapshotEnvironmentBinding found"))
} else {
Expect(seb).To(BeNil(), "Expected no SnapshotEnvironmentBinding to be present, but found one")
}
})

It("checks if the global candidate is not updated", func() {
// give some time to do eventual updates in component
time.Sleep(60 * time.Second)
Expand Down

0 comments on commit 5fc0d33

Please sign in to comment.