Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alexplischke committed Dec 13, 2024
1 parent fe83010 commit d28dfd7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions internal/http/rdcservice_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,21 +208,21 @@ func TestRDCService_PollJob(t *testing.T) {
name: "job not found error from external API",
client: rdc,
jobID: "3",
expectedResp: job.Job{},
expectedResp: job.Job{ID: "3"},
expectedErr: ErrJobNotFound,
},
{
name: "http status is not 200, but 401 from external API",
client: rdc,
jobID: "4",
expectedResp: job.Job{},
expectedResp: job.Job{ID: "4"},
expectedErr: errors.New("unexpected statusCode: 401"),
},
{
name: "unexpected status code from external API",
client: rdc,
jobID: "333",
expectedResp: job.Job{},
expectedResp: job.Job{ID: "333"},
expectedErr: errors.New("internal server error"),
},
{
Expand Down
6 changes: 3 additions & 3 deletions internal/http/resto_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,21 +226,21 @@ func TestResto_GetJobStatus(t *testing.T) {
name: "user not found error from external API",
client: resto,
jobID: "3",
expectedResp: job.Job{},
expectedResp: job.Job{ID: "3"},
expectedErr: ErrJobNotFound,
},
{
name: "http status is not 200, but 401 from external API",
client: resto,
jobID: "4",
expectedResp: job.Job{},
expectedResp: job.Job{ID: "4"},
expectedErr: errors.New("job status request failed; unexpected response code:'401', msg:''"),
},
{
name: "unexpected status code from external API",
client: resto,
jobID: "333",
expectedResp: job.Job{},
expectedResp: job.Job{ID: "333"},
expectedErr: errors.New("internal server error"),
},
{
Expand Down

0 comments on commit d28dfd7

Please sign in to comment.