service

package
v0.0.0-...-317aa01 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

README

Release Service e2e tests suite

Contains E2E tests related to Release Service.

The test cases in this suite are to test release-service functionalities. All tests must have the label release-service.

The happy path test (happy_path.go)

This test verifies the functionality of the release-service in watching for new release CRs then performing the necessary actions based on the design. The Release CR is created by creating Application and component CRs to trigger build Pipeline. Once the build PipelineRun succeeds, Snapshot and Release CRs are created by integration-service if an auto ReleasePlan is configured. Then the Release CR triggers release pipelineRun and the Status of Release CR will be updated accordingly after the release pipelineRun is finished.

Checkpoints:

  • A build PipelineRun is created in the dev namespace.
  • The build PipelineRun passes.
  • The Release CR is created.
  • The release PipelineRun is successfully created in the managed namespace.
  • The PipelineRun should pass.
  • The Release passes.
  • Validate that the Release object is referenced by the PipelineRun.

The happy path with deployment (happy_path_with_deployment.go)

This test is designed to test release-service functionalities with an environment defined. Once the release successfully passes, the application and components will be copied to the specified environment.

Checkpoints:

  • A build PipelineRun is created in the dev namespace.
  • The build PipelineRun passes.
  • The Release CR is created.
  • The release PipelineRun is successfully created in the managed namespace.
  • The release PipelineRun is expected to pass.
  • The Release passes.
  • Copy the application and component to the environment and ensure the process succeeds.

Ensure ReleasePlan has owner references set (release_plan_owner_ref.go)

This test is designed to ensure that the ReleasePlan controller reconciles ReleasePlans to have an owner reference for its application.

Checkpoints:

  • The ReleasePlan has an owner reference for the Application.
  • If the Application is deleted, the ReleasePlan is also deleted.

Negative e2e-tests (missing_release_plan_and_admission.go)

This test file includes two negative test cases.

  1. A release CR will fail if ReleasePlanAdmission is missing.

    Checkpoints:

    • Ensure that Release CR fails on Validation and on Release, with a proper message printed out to the user.
  2. A release CR will fail if ReleasePlan is missing .

    Checkpoints:

    • Ensure that Release CR fails on Validation and on Release, with a proper message printed out to the user.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL