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(STONEBLD-2371): Multi platform controller tests #1134

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions magefiles/magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@
}

func RunE2ETests() error {
labelFilter := utils.GetEnv("E2E_TEST_SUITE_LABEL", "!upgrade-create && !upgrade-verify && !upgrade-cleanup && !release-pipelines")
labelFilter := utils.GetEnv("E2E_TEST_SUITE_LABEL", "!upgrade-create && !upgrade-verify && !upgrade-cleanup && !release-pipelines && !multi-platform-dynamic")
return runTests(labelFilter, "e2e-report.xml")
}

Expand Down Expand Up @@ -342,7 +342,7 @@

if openshiftJobSpec.Refs.Repo != "e2e-tests" {

if strings.HasSuffix(jobName, "-service-e2e") || strings.Contains(jobName, "image-controller") {
if strings.HasSuffix(jobName, "-service-e2e") || strings.Contains(jobName, "controller-e2e") {
var envVarPrefix, imageTagSuffix, testSuiteLabel string
sp := strings.Split(os.Getenv("COMPONENT_IMAGE"), "@")

Expand Down Expand Up @@ -472,6 +472,9 @@
envVarPrefix = "MULTI_PLATFORM_CONTROLLER"
imageTagSuffix = "multi-platform-controller"
testSuiteLabel = "multi-platform"
im := strings.Split(os.Getenv("OTP_SERVER_IMAGE"), "@")
os.Setenv("MULTI_PLATFORM_CONTROLLER_OTP_IMAGE_REPO", im[0])
Dismissed Show dismissed Hide dismissed
os.Setenv("MULTI_PLATFORM_CONTROLLER_OTP_IMAGE_TAG", im[1])
Copy link
Member

Choose a reason for hiding this comment

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

this line needs to change to

if strings.HasSuffix(jobName, "-service-e2e") || strings.Contains(jobName, "controller-e2e") {

otherwise we'll never get to this code block in CI

Dismissed Show dismissed Hide dismissed
requiresMultiPlatformTests = true
}

Expand All @@ -495,12 +498,12 @@
requiresSprayProxyRegistering = true
os.Setenv("INFRA_DEPLOYMENTS_ORG", pr.RemoteName)
os.Setenv("INFRA_DEPLOYMENTS_BRANCH", pr.BranchName)
/* Disabling "build tests" temporary due:
/* Disabling "build tests" and multi-platform tests temporary due:
TODO: Enable when issues are done:
https://issues.redhat.com/browse/RHTAPBUGS-992, https://issues.redhat.com/browse/RHTAPBUGS-991, https://issues.redhat.com/browse/RHTAPBUGS-989,
https://issues.redhat.com/browse/RHTAPBUGS-978,https://issues.redhat.com/browse/RHTAPBUGS-956
*/
os.Setenv("E2E_TEST_SUITE_LABEL", "e2e-demo,rhtap-demo,spi-suite,remote-secret,integration-service,ec,build-templates,multi-platform")
os.Setenv("E2E_TEST_SUITE_LABEL", "e2e-demo,rhtap-demo,spi-suite,remote-secret,integration-service,ec,build-templates")
} else if strings.Contains(jobName, "release-service-catalog") { // release-service-catalog jobs (pull, rehearsal)
envVarPrefix := "RELEASE_SERVICE"
os.Setenv("E2E_TEST_SUITE_LABEL", "release-pipelines")
Expand Down
43 changes: 22 additions & 21 deletions tests/build/multi-platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,23 @@ import (
)

const (
Ec2ArmTag = "multi-platform-e2e-arm64"
HostConfig = "host-config"
ControllerNamespace = "multi-platform-controller"
AwsSecretName = "awskeys"
IbmSecretName = "ibmkey"
IbmKey = "multi-platform-tests"
SshSecretName = "sshkeys"
Ec2User = "ec2-user"
AwsRegion = "us-east-1"
AwsPlatform = "linux/arm64"
DynamicMaxInstances = "1"
IbmZUrl = "https://us-east.iaas.cloud.ibm.com/v1"
IbmPUrl = "https://us-south.power-iaas.cloud.ibm.com"
CRN = "crn:v1:bluemix:public:power-iaas:dal10:a/934e118c399b4a28a70afdf2210d708f:8c9ef568-16a5-4aa2-bfd5-946349c9aeac::"
MultiPlatformSecretKey = "build.appstudio.redhat.com/multi-platform-secret"
MultiPlatformConfigKey = "build.appstudio.redhat.com/multi-platform-config"
Ec2ArmTag = "multi-platform-e2e-arm64"
HostConfig = "host-config"
ControllerNamespace = "multi-platform-controller"
AwsSecretName = "awskeys"
IbmSecretName = "ibmkey"
IbmKey = "multi-platform-tests"
SshSecretName = "sshkeys"
Ec2User = "ec2-user"
AwsRegion = "us-east-1"
AwsPlatform = "linux/arm64"
DynamicMaxInstances = "1"
IbmZUrl = "https://us-east.iaas.cloud.ibm.com/v1"
IbmPUrl = "https://us-south.power-iaas.cloud.ibm.com"
CRN = "crn:v1:bluemix:public:power-iaas:dal10:a/934e118c399b4a28a70afdf2210d708f:8c9ef568-16a5-4aa2-bfd5-946349c9aeac::"
MultiPlatformSecretKey = "build.appstudio.redhat.com/multi-platform-secret"
MultiPlatformConfigKey = "build.appstudio.redhat.com/multi-platform-config"
MultiPlatformDynamicLabel = "multi-platform-dynamic"
)

var (
Expand All @@ -59,7 +60,7 @@ var (
interval = 10 * time.Second
)

var _ = framework.MultiPlatformBuildSuiteDescribe("Multi Platform Controller E2E tests", Pending, Label("multi-platform"), func() {
var _ = framework.MultiPlatformBuildSuiteDescribe("Multi Platform Controller E2E tests", Label("multi-platform"), func() {
var f *framework.Framework
AfterEach(framework.ReportFailure(&f))
var err error
Expand Down Expand Up @@ -175,7 +176,7 @@ var _ = framework.MultiPlatformBuildSuiteDescribe("Multi Platform Controller E2E
})
})
})
Describe("aws dynamic allocation", Label("aws-dynamic"), func() {
Describe("aws dynamic allocation", Label("aws-dynamic"), Label(MultiPlatformDynamicLabel), func() {
var testNamespace, applicationName, componentName, multiPlatformSecretName, multiPlatformTaskName, dynamicInstanceTag, instanceId string
var component *appservice.Component

Expand Down Expand Up @@ -257,7 +258,7 @@ var _ = framework.MultiPlatformBuildSuiteDescribe("Multi Platform Controller E2E
})
})
// TODO: Enable the test after https://issues.redhat.com/browse/KFLUXBUGS-1179 is fixed
Describe("ibm system z dynamic allocation", Label("ibmz-dynamic"), Pending, func() {
Describe("ibm system z dynamic allocation", Label("ibmz-dynamic"), Label(MultiPlatformDynamicLabel), Pending, func() {
var testNamespace, applicationName, componentName, multiPlatformSecretName, multiPlatformTaskName, dynamicInstanceTag, instanceId string
var component *appservice.Component

Expand Down Expand Up @@ -336,7 +337,7 @@ var _ = framework.MultiPlatformBuildSuiteDescribe("Multi Platform Controller E2E
})
})
// TODO: Enable the test after https://issues.redhat.com/browse/KFLUXBUGS-1179 is fixed
Describe("ibm power pc dynamic allocation", Label("ibmp-dynamic"), Pending, func() {
Describe("ibm power pc dynamic allocation", Label("ibmp-dynamic"), Label(MultiPlatformDynamicLabel), Pending, func() {
var testNamespace, applicationName, componentName, multiPlatformSecretName, multiPlatformTaskName, dynamicInstanceTag, instanceId string
var component *appservice.Component

Expand Down Expand Up @@ -889,7 +890,7 @@ func createConfigMapForDynamicInstance(f *framework.Framework, instanceTag strin
hostConfig.Data["dynamic.linux-arm64.region"] = AwsRegion
hostConfig.Data["dynamic.linux-arm64.ami"] = "ami-09d5d0912f52f9514"
hostConfig.Data["dynamic.linux-arm64.instance-type"] = "t4g.micro"
hostConfig.Data["dynamic.linux-arm64.key-name"] = "multi-platform-e2e"
hostConfig.Data["dynamic.linux-arm64.key-name"] = "multi-platform-e2e-tests"
hostConfig.Data["dynamic.linux-arm64.aws-secret"] = AwsSecretName
hostConfig.Data["dynamic.linux-arm64.ssh-secret"] = SshSecretName
hostConfig.Data["dynamic.linux-arm64.security-group"] = "launch-wizard-7"
Expand Down
Loading