Skip to content

Commit

Permalink
Fix test failure due to different request IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
r-ash committed Mar 15, 2024
1 parent 5933e77 commit ef59e0f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/testthat/test-endpoints-upload.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ test_that("can upload input files", {
## Uploading again
res2 <- endpoint$run(charToRaw(file), "survey_data.csv")

expect_equal(res, res2)
expect_equal(res$body, res2$body)

## File has not been uploaded
expect_length(list.files(inputs_dir), 1)
Expand Down Expand Up @@ -47,7 +47,7 @@ test_that("api can upload input files", {
res2 <- api$request("POST", "/internal/upload/input/survey_data.csv",
body = charToRaw(file))

expect_equal(res, res2)
expect_equal(res$body, res2$body)

## File has not been uploaded
expect_length(list.files(inputs_dir), 1)
Expand All @@ -73,7 +73,7 @@ test_that("can upload output files", {
## Uploading again
res2 <- endpoint$run(charToRaw(file), "survey_data.csv")

expect_equal(res, res2)
expect_equal(res$body, res2$body)

## File has not been uploaded
expect_length(list.files(results_dir), 1)
Expand Down Expand Up @@ -102,7 +102,7 @@ test_that("api can upload output files", {
res2 <- api$request("POST", "/internal/upload/result/survey_data.csv",
body = charToRaw(file))

expect_equal(res, res2)
expect_equal(res$body, res2$body)

## File has not been uploaded
expect_length(list.files(results_dir), 1)
Expand Down

0 comments on commit ef59e0f

Please sign in to comment.