Skip to content

Commit

Permalink
chore: update unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sweatybridge committed Mar 3, 2025
1 parent 7d39d19 commit 9aa39f6
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion internal/db/branch/create/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func TestBranchCreation(t *testing.T) {
// Run test
err := createBranch(context.Background(), "test-branch")
// Validate api
assert.ErrorContains(t, err, "request returned Service Unavailable for API route and version")
assert.ErrorContains(t, err, "request returned 503 Service Unavailable for API route and version")
assert.Empty(t, apitest.ListUnmatchedRequests())
})

Expand Down
2 changes: 1 addition & 1 deletion internal/db/dump/dump_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func TestPullCommand(t *testing.T) {
// Run test
err := Run(context.Background(), "", dbConfig, nil, nil, false, false, false, false, false, fsys)
// Check error
assert.ErrorContains(t, err, "request returned Service Unavailable for API route and version")
assert.ErrorContains(t, err, "request returned 503 Service Unavailable for API route and version")
assert.Empty(t, apitest.ListUnmatchedRequests())
})

Expand Down
4 changes: 2 additions & 2 deletions internal/db/start/start_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,11 @@ func TestStartDatabase(t *testing.T) {
ReplyError(errors.New("network error"))
gock.New(utils.Docker.DaemonHost()).
Get("/v" + utils.Docker.ClientVersion() + "/images/" + utils.GetRegistryImageUrl(utils.Config.Db.Image) + "/json").
Reply(http.StatusInternalServerError)
Reply(http.StatusServiceUnavailable)
// Run test
err := StartDatabase(context.Background(), "", fsys, io.Discard)
// Check error
assert.ErrorContains(t, err, "request returned Internal Server Error for API route and version")
assert.ErrorContains(t, err, "request returned 503 Service Unavailable for API route and version")
assert.Empty(t, apitest.ListUnmatchedRequests())
})
}
Expand Down
2 changes: 1 addition & 1 deletion internal/stop/stop_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func TestStopCommand(t *testing.T) {
// Run test
err := Run(context.Background(), false, "test", false, afero.NewReadOnlyFs(fsys))
// Check error
assert.ErrorContains(t, err, "request returned Service Unavailable for API route and version")
assert.ErrorContains(t, err, "request returned 503 Service Unavailable for API route and version")
assert.Empty(t, apitest.ListUnmatchedRequests())
})
}
Expand Down
2 changes: 1 addition & 1 deletion internal/utils/docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ func TestRunOnce(t *testing.T) {
Reply(http.StatusOK)
// Run test
_, err = DockerRunOnce(context.Background(), imageId, nil, nil)
assert.ErrorContains(t, err, "request returned Service Unavailable for API route and version")
assert.ErrorContains(t, err, "request returned 503 Service Unavailable for API route and version")
// Validate api
assert.Empty(t, apitest.ListUnmatchedRequests())
})
Expand Down

0 comments on commit 9aa39f6

Please # to comment.