Skip to content

Commit

Permalink
Fix aarch64 unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffdyoung committed Oct 14, 2022
1 parent 618a1c7 commit bf0f742
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions internal/bminventory/inventory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4292,7 +4292,7 @@ var _ = Describe("cluster", func() {
Expect(count).To(Equal(int64(1)))
})

It("success arm64 baremetal platform with 4.11 where it is supported", func() {
It("success aarch64 baremetal platform with 4.11 where it is supported", func() {
infraEnvID = strfmt.UUID(uuid.New().String())
clusterID = strfmt.UUID(uuid.New().String())
err := db.Create(&common.Cluster{Cluster: models.Cluster{
Expand Down Expand Up @@ -4352,7 +4352,7 @@ var _ = Describe("cluster", func() {
Expect(count).To(Equal(int64(1)))
})

It("fail arm64 baremetal platform in case no x86 was found", func() {
It("fail aarch64 baremetal platform in case no x86 was found", func() {
infraEnvID = strfmt.UUID(uuid.New().String())
clusterID = strfmt.UUID(uuid.New().String())
err := db.Create(&common.Cluster{Cluster: models.Cluster{
Expand Down Expand Up @@ -11620,7 +11620,7 @@ var _ = Describe("TestRegisterCluster", func() {
Expect(actual.Payload.CPUArchitecture).To(Equal(common.TestDefaultConfig.CPUArchitecture))
})

It("Register cluster with arm64 CPU architecture", func() {
It("Register cluster with aarch64 CPU architecture", func() {
mockClusterRegisterSuccess(true)
mockAMSSubscription(ctx)
mockVersions.EXPECT().GetCPUArchitectures(gomock.Any()).Return(
Expand All @@ -11640,7 +11640,7 @@ var _ = Describe("TestRegisterCluster", func() {
Expect(actual.Payload.CPUArchitecture).To(Equal(common.AARCH64CPUArchitecture))
})

It("Register cluster with arm64 CPU architecture as multiarch if multiarch release image used", func() {
It("Register cluster with aarch64 CPU architecture as multiarch if multiarch release image used", func() {
mockSecretValidator.EXPECT().ValidatePullSecret(gomock.Any(), gomock.Any()).Return(nil).Times(1)
mockVersions.EXPECT().GetReleaseImage(gomock.Any(), gomock.Any()).Return(&models.ReleaseImage{
CPUArchitecture: swag.String(common.MultiCPUArchitecture),
Expand Down Expand Up @@ -11692,7 +11692,7 @@ var _ = Describe("TestRegisterCluster", func() {
Expect(actual.Payload.CPUArchitecture).To(Equal(common.MultiCPUArchitecture))
})

It("Register cluster with arm64 CPU architecture - without UserManagedNetworking", func() {
It("Register cluster with aarch64 CPU architecture - without UserManagedNetworking", func() {
mockEvents.EXPECT().SendClusterEvent(gomock.Any(), eventstest.NewEventMatcher(
eventstest.WithNameMatcher(eventgen.ClusterRegistrationFailedEventName),
eventstest.WithMessageContainsMatcher(fmt.Sprintf("Non x86_64 CPU architectures for version %s "+
Expand Down Expand Up @@ -14501,7 +14501,7 @@ var _ = Describe("Update cluster - feature usage flags", func() {
It("Add feature usage of ARM64 when cluster arch match", func() {
mockUsage.EXPECT().Add(usages, usage.CPUArchitectureARM64, nil).Times(1)
mockUsage.EXPECT().Remove(usages, usage.CPUArchitectureARM64).Times(0)
cluster.CPUArchitecture = "arm64"
cluster.CPUArchitecture = "aarch64"
bm.updateClusterCPUFeatureUsage(cluster, usages)
})

Expand Down
4 changes: 2 additions & 2 deletions internal/versions/versions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -598,15 +598,15 @@ var _ = Describe("list versions", func() {
h, err = NewHandler(logger, mockRelease, versions, *osImages, models.ReleaseImages{
&models.ReleaseImage{
CPUArchitecture: swag.String(common.MultiCPUArchitecture),
CPUArchitectures: []string{common.X86CPUArchitecture, common.ARM64CPUArchitecture},
CPUArchitectures: []string{common.X86CPUArchitecture, common.AARCH64CPUArchitecture},
OpenshiftVersion: swag.String("4.11.1"),
URL: swag.String("release_4.11.1"),
Default: false,
Version: swag.String("4.11.1-chocobomb-for-test"),
},
&models.ReleaseImage{
CPUArchitecture: swag.String(common.MultiCPUArchitecture),
CPUArchitectures: []string{common.X86CPUArchitecture, common.ARM64CPUArchitecture},
CPUArchitectures: []string{common.X86CPUArchitecture, common.AARCH64CPUArchitecture},
OpenshiftVersion: swag.String("4.12"),
URL: swag.String("release_4.12"),
Default: false,
Expand Down
6 changes: 3 additions & 3 deletions subsystem/cluster_v2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,11 +412,11 @@ var _ = Describe("[V2ClusterTests] multiarch", func() {
infraEnv := registerInfraEnv(nil, models.ImageTypeFullIso)
X86infraEnvID = *infraEnv.ID

// bound arm64 infraEnv
// bound aarch64 infraEnv
infraEnv = registerInfraEnvSpecificVersionAndArch(&clusterID, models.ImageTypeFullIso, common.AARCH64CPUArchitecture, "")
ARMinfraEnvID = *infraEnv.ID

By("register h2 h3 to cluster via the bound arm64 infraenv")
By("register h2 h3 to cluster via the bound aarch64 infraenv")
ips = hostutil.GenerateIPv4Addresses(3, defaultCIDRv4)
h2 = registerNode(ctx, ARMinfraEnvID, "h2", ips[1])
h3 = registerNode(ctx, ARMinfraEnvID, "h3", ips[2])
Expand Down Expand Up @@ -459,7 +459,7 @@ var _ = Describe("[V2ClusterTests] multiarch", func() {
IgnoreStateInfo)
})

It("Bind single host to arm64 bound infraenv", func() {
It("Bind single host to aarch64 bound infraenv", func() {
By("register h1 with the bound infraenv")
h1 = &registerHost(ARMinfraEnvID).Host
host := getHostV2(ARMinfraEnvID, *h1.ID)
Expand Down

0 comments on commit bf0f742

Please sign in to comment.