Skip to content
Merged
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
2 changes: 1 addition & 1 deletion internal/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ container-disk-image: quay.io/test/image:latest

It("should return error for missing file", func() {
err1 := cmd.Flags().Set("config", "/nonexistent/path/config.yaml")
Expect(err1).To(HaveOccurred())
Expect(err1).To(BeNil())

_, err := config.LoadConfig(cmd)
Expect(err).To(HaveOccurred())
Expand Down
4 changes: 2 additions & 2 deletions internal/wait/wait_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,15 @@ var _ = Describe("WaitForVMReady", func() {

err := wait.WaitForVMReady(ctx, c, "stuck-vm", "default", 50*time.Millisecond, 10*time.Millisecond)
Expect(err).To(HaveOccurred())
Expect(err.Error()).To(ContainSubstring("timed out"))
Expect(err).To(MatchError(wait.ErrVMTimeout))
})

It("should retry when VMI not found and eventually timeout", func() {
c := fake.NewClientBuilder().WithScheme(scheme).Build()

err := wait.WaitForVMReady(ctx, c, "nonexistent", "default", 50*time.Millisecond, 10*time.Millisecond)
Expect(err).To(HaveOccurred())
Expect(err.Error()).To(ContainSubstring("timed out"))
Expect(err).To(MatchError(wait.ErrVMTimeout))
})

It("should succeed when VMI appears after initial not-found", func() {
Expand Down
2 changes: 1 addition & 1 deletion internal/workloads/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RestartSec=10
WantedBy=multi-user.target
`

var ErrUnknownNetworkRole = errors.New("unexpected network workload role (expected 'server' or 'client')")
var ErrUnknownNetworkRole = errors.New("unexpected network role; expected 'server' or 'client'")

// NetworkWorkload generates cloud-init userdata for an iperf3 network benchmark.
// It creates two VMs: a server running iperf3 in listen mode, and a client that
Expand Down
2 changes: 1 addition & 1 deletion internal/workloads/network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ var _ = Describe("NetworkWorkload", func() {
It("should return error for unknown role", func() {
_, err := w.UserdataForRole("unknown", "virtwork")
Expect(err).To(HaveOccurred())
Expect(err.Error()).To(ContainSubstring("unknown"))
Expect(err).To(MatchError(workloads.ErrUnknownNetworkRole))
})

It("should include iperf3 in packages for server", func() {
Expand Down