Skip to content

Commit

Permalink
Harmonize registry ports in test suites
Browse files Browse the repository at this point in the history
  • Loading branch information
afritzler committed Aug 21, 2024
1 parent 4e0df6a commit 227d47d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion internal/controller/server_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ var _ = Describe("Server Controller", func() {
HaveField("Status.SKU", "8675309"),
HaveField("Status.SerialNumber", "437XR1138R2"),
HaveField("Status.IndicatorLED", metalv1alpha1.OffIndicatorLED),
HaveField("Status.State", metalv1alpha1.ServerStateInitial),
HaveField("Status.State", metalv1alpha1.ServerStateDiscovery),
HaveField("Status.PowerState", metalv1alpha1.ServerOffPowerState),
))
DeferCleanup(k8sClient.Delete, server)
Expand Down
4 changes: 2 additions & 2 deletions internal/controller/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var (
cfg *rest.Config
k8sClient client.Client
testEnv *envtest.Environment
registryURL = "http://localhost:12345"
registryURL = "http://localhost:30000"
)

func TestControllers(t *testing.T) {
Expand Down Expand Up @@ -97,7 +97,7 @@ var _ = BeforeSuite(func() {
var mgrCtx context.Context
mgrCtx, cancel := context.WithCancel(context.Background())
DeferCleanup(cancel)
registryServer := registry.NewServer(":12345")
registryServer := registry.NewServer(":30000")
go func() {
defer GinkgoRecover()
Expect(registryServer.Start(mgrCtx)).To(Succeed(), "failed to start registry server")
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/testdata/ignition.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ systemd:
ExecStartPre=-/usr/bin/docker stop metalprobe
ExecStartPre=-/usr/bin/docker rm metalprobe
ExecStartPre=/usr/bin/docker pull foo:latest
ExecStart=/usr/bin/docker run --network host --privileged --name metalprobe foo:latest --registry-url=http://localhost:12345 --server-uuid=38947555-7742-3448-3784-823347823834
ExecStart=/usr/bin/docker run --network host --privileged --name metalprobe foo:latest --registry-url=http://localhost:30000 --server-uuid=38947555-7742-3448-3784-823347823834
ExecStop=/usr/bin/docker stop metalprobe
[Install]
WantedBy=multi-user.target
Expand Down
4 changes: 2 additions & 2 deletions internal/probe/probe_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ var (
probeAgent *probe.Agent
registryServer *registry.Server

registryAddr = ":15432"
registryURL = "http://localhost:15432"
registryAddr = ":30001"
registryURL = "http://localhost:30001"
systemUUID = "1234-5678"
)

Expand Down
4 changes: 2 additions & 2 deletions internal/registry/registry_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (

var (
server *registry.Server
testServerURL = "http://localhost:54321"
testServerAddr = ":54321"
testServerURL = "http://localhost:30002"
testServerAddr = ":30002"
)

func TestRegistry(t *testing.T) {
Expand Down

0 comments on commit 227d47d

Please sign in to comment.