Skip to content

Commit

Permalink
SRVKP-6722 new tests for versioned ecosystem tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
jayesh-garg committed Feb 10, 2025
1 parent 4fa33dc commit 0242650
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
22 changes: 21 additions & 1 deletion specs/operator/addon.spec
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,24 @@ Importance: Critical
Pos/Neg: Negative

Steps:
* Update addon config with resolverTasks as "false" and pipelineTemplates as "true" and expect message "validation failed: pipelineTemplates cannot be true if resolverTask is false"
* Update addon config with resolverTasks as "false" and pipelineTemplates as "true" and expect message "validation failed: pipelineTemplates cannot be true if resolverTask is false"

## Verify versioned ecosystem tasks: PIPELINES-15-TC09
Tags: e2e, integration, addon
Component: Pipelines
Level: Integration
Type: Functional
Importance: Critical

Steps:
* Verify versioned ecosystem tasks

## Verify versioned stepaction tasks: PIPELINES-15-TC010
Tags: e2e, integration, addon
Component: Pipelines
Level: Integration
Type: Functional
Importance: Critical

Steps:
* Verify versioned ecosystem step actions
25 changes: 25 additions & 0 deletions steps/cli/oc.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/getgauge-contrib/gauge-go/gauge"
m "github.com/getgauge-contrib/gauge-go/models"
"github.com/getgauge-contrib/gauge-go/testsuit"
"github.com/openshift-pipelines/release-tests/pkg/cmd"
"github.com/openshift-pipelines/release-tests/pkg/oc"
"github.com/openshift-pipelines/release-tests/pkg/openshift"
"github.com/openshift-pipelines/release-tests/pkg/store"
Expand Down Expand Up @@ -165,6 +166,30 @@ var _ = gauge.Step("Update addon config with resolverStepActions as <resolverSte
}
})

var _ = gauge.Step("Verify versioned ecosystem tasks", func() {
taskList := cmd.MustSucceed("oc", "get", "task", "-n", "openshift-pipelines").Stdout()
requiredTasks := []string{"buildah", "git-cli", "git-clone", "kn", "kn-apply", "maven", "openshift-client", "s2i-dotnet", "s2i-go", "s2i-java", "s2i-nodejs", "s2i-perl", "s2i-php", "s2i-python", "s2i-ruby", "skopeo-copy", "tkn"}
requiredVersions := os.Getenv("OSP_VERSION")
for _, task := range requiredTasks {
taskWithVersion := task + "-" + requiredVersions
if !strings.Contains(taskList, taskWithVersion) {
testsuit.T.Errorf("Task %s not found in namespace openshift-pipelines", taskWithVersion)
}
}
})

var _ = gauge.Step("Verify versioned ecosystem step actions", func() {
taskList := cmd.MustSucceed("oc", "get", "stepaction", "-n", "openshift-pipelines").Stdout()
requiredTasks := []string{"git-clone"}
requiredVersions := os.Getenv("OSP_VERSION")
for _, task := range requiredTasks {
taskWithVersion := task + "-" + requiredVersions
if !strings.Contains(taskList, taskWithVersion) {
testsuit.T.Errorf("Task %s not found in namespace openshift-pipelines", taskWithVersion)
}
}
})

var _ = gauge.Step("Create project <projectName>", func(projectName string) {
log.Printf("Check if project %v already exists", projectName)
if oc.CheckProjectExists(projectName) {
Expand Down

0 comments on commit 0242650

Please sign in to comment.