Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mrc 4969 Allow <reportname>.R or orderly.R as orderly file #122

Merged
merged 13 commits into from
Feb 29, 2024
Prev Previous commit
Next Next commit
test fix2
  • Loading branch information
M-Kusumgar committed Feb 8, 2024
commit c7790068c098b8681a85cc00b5243f61b137e301
6 changes: 4 additions & 2 deletions tests/testthat/test-zzz-location-http.R
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,15 @@ describe("http location integration tests", {
root_tmp <- create_temporary_root(use_file_store = TRUE)
id_tmp <- create_random_packet(root_tmp)

hash_bad <- hash_data("", "sha256")
hash <- root_tmp$index$metadata(id_tmp)$files$hash
meta <- read_string(
file.path(root_tmp$path, ".outpack", "metadata", id_tmp))

orderly_location_http$new(url)$push_file(find_file_by_hash(root_tmp, hash), hash)

## Trigger the error directly:
cl <- outpack_http_client$new(url)
err <- expect_error(cl$post(sprintf("/packet/%s", hash_bad), meta,
err <- expect_error(cl$post(sprintf("/packet/%s", hash), meta,
httr::content_type("text/plain")),
"Expected hash '.+' but found '.+'")
})
Expand Down
Loading