From 11f85dd3f66654492dd99a4608bc0f1857d29a53 Mon Sep 17 00:00:00 2001 From: Diego Barneche Date: Sat, 20 May 2023 12:29:20 +0800 Subject: [PATCH] updated httptest and mock tests --- test_running_updating.Rmd | 19 ++------------- .../a/5c09bf93f315d/series.json | 6 ++--- .../a/5c09bf93f315d/wrong.R | 20 ++++++++-------- .../a/5c09bf93f315d/wrong.R | 20 ++++++++-------- .../a/5c09bf93f315d/wrong.R | 20 ++++++++-------- .../a/5c09bf93f315d/data-3f57c4.R | 24 +++++++++---------- .../a/5c09bf93f315d/data-aa36ae.R | 24 +++++++++---------- .../a/5c09bf93f315d/data-3f57c4.R | 24 +++++++++---------- .../a/5c09bf93f315d/data-aa36ae.R | 24 +++++++++---------- .../data/summary-by-deployment.R | 20 ++++++++-------- .../a/5c09bf93f315d/data/summary-by-series.R | 20 ++++++++-------- 11 files changed, 103 insertions(+), 118 deletions(-) diff --git a/test_running_updating.Rmd b/test_running_updating.Rmd index 0136f05..00ae18b 100644 --- a/test_running_updating.Rmd +++ b/test_running_updating.Rmd @@ -3,6 +3,7 @@ From `dataaimsr/`, run ```{r} +library(httptest) # installed from https://github.com/nealrichardson/httptest/commit/5fc2be9f8627fa36d04ee06de0291c1d7633d1a8 library(testthat) library(roxygen2) library(devtools) @@ -10,25 +11,9 @@ system("rm -rf tests/api") roxygen2::roxygenise() devtools::install(build_vignettes = FALSE) testthat::test_local(".") -all_mock_dirs <- dir("tests/api", full.names = TRUE, recursive = TRUE) |> - dirname() |> - unique() -new_mock_dirs <- gsub( - "api.aims.gov.au/data-v2.0/10.25845", "a", all_mock_dirs, fixed = TRUE -) -for (i in seq_along(all_mock_dirs)) { - system(paste0("mkdir -p ", new_mock_dirs[i])) - system(paste0( - "cp -R ", all_mock_dirs[i], "/* ", new_mock_dirs[i], "/" , collapse = "" - )) - to_rm <- dirname(all_mock_dirs[i]) |> - dirname() |> - dirname() - system(paste0("rm -rf ", to_rm)) -} ``` -This will delete all existing mock files and regenerate them. Then return to root directory and check if it all passes: +The above block will delete all existing mock files and regenerate them. Then return to root directory and check if it all passes: ```{r} rm(list = ls()) diff --git a/tests/api/Correct-structure-filtervalues/a/5c09bf93f315d/series.json b/tests/api/Correct-structure-filtervalues/a/5c09bf93f315d/series.json index 7a2fba0..1991a97 100644 --- a/tests/api/Correct-structure-filtervalues/a/5c09bf93f315d/series.json +++ b/tests/api/Correct-structure-filtervalues/a/5c09bf93f315d/series.json @@ -242,7 +242,7 @@ { "series_id": 55, "series": "Cleveland Bay Weather Station Maximum Wind Speed 10 Minutes", - "series_short": "Max Wind Speed 10 mins" + "series_short": "Wind Speed 10 mins" }, { "series_id": 57, @@ -5201,8 +5201,8 @@ }, { "series_id": 112711, - "series": "Masig Island Weather Station Depth @3m", - "series_short": "Depth @3m" + "series": "CHANNEL 112711", + "series_short": "CHANNEL 112711" }, { "series_id": 113847, diff --git a/tests/api/Correctly-process-requests/a/5c09bf93f315d/wrong.R b/tests/api/Correctly-process-requests/a/5c09bf93f315d/wrong.R index ef768f3..672321a 100644 --- a/tests/api/Correctly-process-requests/a/5c09bf93f315d/wrong.R +++ b/tests/api/Correctly-process-requests/a/5c09bf93f315d/wrong.R @@ -1,21 +1,21 @@ structure(list(url = "https://api.aims.gov.au/data-v2.0/10.25845/5c09bf93f315d/wrong", - status_code = 403L, headers = structure(list(date = "Fri, 19 May 2023 03:36:12 GMT", + status_code = 403L, headers = structure(list(date = "Fri, 19 May 2023 05:57:03 GMT", `content-type` = "application/json", `content-length` = "42", - `x-amzn-requestid` = "fd777f58-dedd-4cd9-b280-aedfcee9b141", + `x-amzn-requestid` = "64a48c61-4f38-4100-b948-d50d1654c7c9", `x-amzn-errortype` = "MissingAuthenticationTokenException", - `x-amz-apigw-id` = "FJo6_FssSwMF-Ig="), class = c("insensitive", + `x-amz-apigw-id` = "FJ9jhG4dSwMF13A="), class = c("insensitive", "list")), all_headers = list(list(status = 403L, version = "HTTP/2", - headers = structure(list(date = "Fri, 19 May 2023 03:36:12 GMT", + headers = structure(list(date = "Fri, 19 May 2023 05:57:03 GMT", `content-type` = "application/json", `content-length` = "42", - `x-amzn-requestid` = "fd777f58-dedd-4cd9-b280-aedfcee9b141", + `x-amzn-requestid` = "64a48c61-4f38-4100-b948-d50d1654c7c9", `x-amzn-errortype` = "MissingAuthenticationTokenException", - `x-amz-apigw-id` = "FJo6_FssSwMF-Ig="), class = c("insensitive", + `x-amz-apigw-id` = "FJ9jhG4dSwMF13A="), class = c("insensitive", "list")))), cookies = structure(list(domain = logical(0), flag = logical(0), path = logical(0), secure = logical(0), expiration = structure(numeric(0), class = c("POSIXct", "POSIXt")), name = logical(0), value = logical(0)), row.names = integer(0), class = "data.frame"), content = charToRaw("{\"message\":\"Missing Authentication Token\"}"), - date = structure(1684467372, class = c("POSIXct", "POSIXt" - ), tzone = "GMT"), times = c(redirect = 0, namelookup = 5.4e-05, - connect = 0, pretransfer = 0.000249, starttransfer = 0.060357, - total = 0.060455)), class = "response") + date = structure(1684475823, class = c("POSIXct", "POSIXt" + ), tzone = "GMT"), times = c(redirect = 0, namelookup = 7.1e-05, + connect = 0, pretransfer = 0.000223, starttransfer = 0.066316, + total = 0.067288)), class = "response") diff --git a/tests/api/Correctly-update-request-output-format/a/5c09bf93f315d/wrong.R b/tests/api/Correctly-update-request-output-format/a/5c09bf93f315d/wrong.R index 9994770..cd6fd16 100644 --- a/tests/api/Correctly-update-request-output-format/a/5c09bf93f315d/wrong.R +++ b/tests/api/Correctly-update-request-output-format/a/5c09bf93f315d/wrong.R @@ -1,21 +1,21 @@ structure(list(url = "https://api.aims.gov.au/data-v2.0/10.25845/5c09bf93f315d/wrong", - status_code = 403L, headers = structure(list(date = "Fri, 19 May 2023 03:36:13 GMT", + status_code = 403L, headers = structure(list(date = "Fri, 19 May 2023 05:57:04 GMT", `content-type` = "application/json", `content-length` = "42", - `x-amzn-requestid` = "ae56f5ca-ba75-4bd0-9b91-f38a371e413f", + `x-amzn-requestid` = "23a99114-d55f-4f9c-9085-0ff6a9a83c49", `x-amzn-errortype` = "MissingAuthenticationTokenException", - `x-amz-apigw-id` = "FJo7JGKjSwMFesw="), class = c("insensitive", + `x-amz-apigw-id` = "FJ9jrE56ywMFujQ="), class = c("insensitive", "list")), all_headers = list(list(status = 403L, version = "HTTP/2", - headers = structure(list(date = "Fri, 19 May 2023 03:36:13 GMT", + headers = structure(list(date = "Fri, 19 May 2023 05:57:04 GMT", `content-type` = "application/json", `content-length` = "42", - `x-amzn-requestid` = "ae56f5ca-ba75-4bd0-9b91-f38a371e413f", + `x-amzn-requestid` = "23a99114-d55f-4f9c-9085-0ff6a9a83c49", `x-amzn-errortype` = "MissingAuthenticationTokenException", - `x-amz-apigw-id` = "FJo7JGKjSwMFesw="), class = c("insensitive", + `x-amz-apigw-id` = "FJ9jrE56ywMFujQ="), class = c("insensitive", "list")))), cookies = structure(list(domain = logical(0), flag = logical(0), path = logical(0), secure = logical(0), expiration = structure(numeric(0), class = c("POSIXct", "POSIXt")), name = logical(0), value = logical(0)), row.names = integer(0), class = "data.frame"), content = charToRaw("{\"message\":\"Missing Authentication Token\"}"), - date = structure(1684467373, class = c("POSIXct", "POSIXt" - ), tzone = "GMT"), times = c(redirect = 0, namelookup = 5.4e-05, - connect = 0, pretransfer = 0.000249, starttransfer = 0.059326, - total = 0.059432)), class = "response") + date = structure(1684475824, class = c("POSIXct", "POSIXt" + ), tzone = "GMT"), times = c(redirect = 0, namelookup = 2.5e-05, + connect = 0, pretransfer = 0.000111, starttransfer = 0.060877, + total = 0.061022)), class = "response") diff --git a/tests/api/JSON-results-Correct-structure-helpers/a/5c09bf93f315d/wrong.R b/tests/api/JSON-results-Correct-structure-helpers/a/5c09bf93f315d/wrong.R index 040a92b..12fb497 100644 --- a/tests/api/JSON-results-Correct-structure-helpers/a/5c09bf93f315d/wrong.R +++ b/tests/api/JSON-results-Correct-structure-helpers/a/5c09bf93f315d/wrong.R @@ -1,21 +1,21 @@ structure(list(url = "https://api.aims.gov.au/data-v2.0/10.25845/5c09bf93f315d/wrong", - status_code = 403L, headers = structure(list(date = "Fri, 19 May 2023 03:36:11 GMT", + status_code = 403L, headers = structure(list(date = "Fri, 19 May 2023 05:57:02 GMT", `content-type` = "application/json", `content-length` = "42", - `x-amzn-requestid` = "ef8928da-761e-44dd-b819-12b164e7d5c0", + `x-amzn-requestid` = "2212242a-1cd6-4c5d-acb2-638375388e7a", `x-amzn-errortype` = "MissingAuthenticationTokenException", - `x-amz-apigw-id` = "FJo62ECJywMF7_A="), class = c("insensitive", + `x-amz-apigw-id` = "FJ9jYH4mSwMFY9A="), class = c("insensitive", "list")), all_headers = list(list(status = 403L, version = "HTTP/2", - headers = structure(list(date = "Fri, 19 May 2023 03:36:11 GMT", + headers = structure(list(date = "Fri, 19 May 2023 05:57:02 GMT", `content-type` = "application/json", `content-length` = "42", - `x-amzn-requestid` = "ef8928da-761e-44dd-b819-12b164e7d5c0", + `x-amzn-requestid` = "2212242a-1cd6-4c5d-acb2-638375388e7a", `x-amzn-errortype` = "MissingAuthenticationTokenException", - `x-amz-apigw-id` = "FJo62ECJywMF7_A="), class = c("insensitive", + `x-amz-apigw-id` = "FJ9jYH4mSwMFY9A="), class = c("insensitive", "list")))), cookies = structure(list(domain = logical(0), flag = logical(0), path = logical(0), secure = logical(0), expiration = structure(numeric(0), class = c("POSIXct", "POSIXt")), name = logical(0), value = logical(0)), row.names = integer(0), class = "data.frame"), content = charToRaw("{\"message\":\"Missing Authentication Token\"}"), - date = structure(1684467371, class = c("POSIXct", "POSIXt" - ), tzone = "GMT"), times = c(redirect = 0, namelookup = 5.4e-05, - connect = 0, pretransfer = 0.000264, starttransfer = 0.060373, - total = 0.060442)), class = "response") + date = structure(1684475822, class = c("POSIXct", "POSIXt" + ), tzone = "GMT"), times = c(redirect = 0, namelookup = 2.5e-05, + connect = 0, pretransfer = 0.000103, starttransfer = 0.060823, + total = 0.060888)), class = "response") diff --git a/tests/api/Wrong-filters-aimsdata/a/5c09bf93f315d/data-3f57c4.R b/tests/api/Wrong-filters-aimsdata/a/5c09bf93f315d/data-3f57c4.R index 089bf6d..bf72633 100644 --- a/tests/api/Wrong-filters-aimsdata/a/5c09bf93f315d/data-3f57c4.R +++ b/tests/api/Wrong-filters-aimsdata/a/5c09bf93f315d/data-3f57c4.R @@ -1,21 +1,21 @@ structure(list(url = "https://api.aims.gov.au/data-v2.0/10.25845/5c09bf93f315d/data?series=2687", - status_code = 422L, headers = structure(list(date = "Fri, 19 May 2023 03:29:56 GMT", + status_code = 422L, headers = structure(list(date = "Fri, 19 May 2023 05:50:55 GMT", `content-type` = "application/json", `content-length` = "176", - `x-amzn-requestid` = "eba48af2-71d5-4e55-8ef1-17d9dbf28e76", - `x-amzn-remapped-content-length` = "176", `x-amz-apigw-id` = "FJoAOG50SwMFaAA=", - `x-amzn-trace-id` = "Root=1-6466ed34-1d9826083a1e73c64c3ef612;Sampled=0;lineage=31aaf29f:0"), class = c("insensitive", + `x-amzn-requestid` = "015f3bf8-c487-4e68-9fe3-1f319ab59b90", + `x-amzn-remapped-content-length` = "176", `x-amz-apigw-id` = "FJ8p-GW-ywMFSxg=", + `x-amzn-trace-id` = "Root=1-64670e3f-0ebf2596038f2f42623d5b34;Sampled=0;lineage=31aaf29f:0"), class = c("insensitive", "list")), all_headers = list(list(status = 422L, version = "HTTP/2", - headers = structure(list(date = "Fri, 19 May 2023 03:29:56 GMT", + headers = structure(list(date = "Fri, 19 May 2023 05:50:55 GMT", `content-type` = "application/json", `content-length` = "176", - `x-amzn-requestid` = "eba48af2-71d5-4e55-8ef1-17d9dbf28e76", - `x-amzn-remapped-content-length` = "176", `x-amz-apigw-id` = "FJoAOG50SwMFaAA=", - `x-amzn-trace-id` = "Root=1-6466ed34-1d9826083a1e73c64c3ef612;Sampled=0;lineage=31aaf29f:0"), class = c("insensitive", + `x-amzn-requestid` = "015f3bf8-c487-4e68-9fe3-1f319ab59b90", + `x-amzn-remapped-content-length` = "176", `x-amz-apigw-id` = "FJ8p-GW-ywMFSxg=", + `x-amzn-trace-id` = "Root=1-64670e3f-0ebf2596038f2f42623d5b34;Sampled=0;lineage=31aaf29f:0"), class = c("insensitive", "list")))), cookies = structure(list(domain = logical(0), flag = logical(0), path = logical(0), secure = logical(0), expiration = structure(numeric(0), class = c("POSIXct", "POSIXt")), name = logical(0), value = logical(0)), row.names = integer(0), class = "data.frame"), content = charToRaw("{\"detail\":[{\"loc\":[\"query\",\"from_date\"],\"msg\":\"field required\",\"type\":\"value_error.missing\"},{\"loc\":[\"query\",\"thru_date\"],\"msg\":\"field required\",\"type\":\"value_error.missing\"}]}"), - date = structure(1684466996, class = c("POSIXct", "POSIXt" - ), tzone = "GMT"), times = c(redirect = 0, namelookup = 4.5e-05, - connect = 0, pretransfer = 0.000135, starttransfer = 0.137363, - total = 0.137447)), class = "response") + date = structure(1684475455, class = c("POSIXct", "POSIXt" + ), tzone = "GMT"), times = c(redirect = 0, namelookup = 2.5e-05, + connect = 0, pretransfer = 0.000112, starttransfer = 0.141456, + total = 0.141584)), class = "response") diff --git a/tests/api/Wrong-filters-aimsdata/a/5c09bf93f315d/data-aa36ae.R b/tests/api/Wrong-filters-aimsdata/a/5c09bf93f315d/data-aa36ae.R index 883765a..4f83bc4 100644 --- a/tests/api/Wrong-filters-aimsdata/a/5c09bf93f315d/data-aa36ae.R +++ b/tests/api/Wrong-filters-aimsdata/a/5c09bf93f315d/data-aa36ae.R @@ -1,20 +1,20 @@ structure(list(url = "https://api.aims.gov.au/data-v2.0/10.25845/5c09bf93f315d/data?series_id=2687&from_date=1900-01-01&thru_date=1900-01-10", - status_code = 500L, headers = structure(list(date = "Fri, 19 May 2023 03:29:56 GMT", + status_code = 500L, headers = structure(list(date = "Fri, 19 May 2023 05:50:55 GMT", `content-type` = "text/plain; charset=utf-8", `content-length` = "21", - `x-amzn-requestid` = "e7c91009-5e37-44bd-a441-80742ccfdf74", - `x-amzn-remapped-content-length` = "21", `x-amz-apigw-id` = "FJoAQFsDSwMFbnA=", - `x-amzn-trace-id` = "Root=1-6466ed34-616fd7d016f61c3b72584f47;Sampled=0;lineage=31aaf29f:0"), class = c("insensitive", + `x-amzn-requestid` = "a0190d2d-2115-4662-945b-6ae1567897fc", + `x-amzn-remapped-content-length` = "21", `x-amz-apigw-id` = "FJ8p_H84ywMFWIQ=", + `x-amzn-trace-id` = "Root=1-64670e3f-0f303f32637c42770dde5b8a;Sampled=0;lineage=31aaf29f:0"), class = c("insensitive", "list")), all_headers = list(list(status = 500L, version = "HTTP/2", - headers = structure(list(date = "Fri, 19 May 2023 03:29:56 GMT", + headers = structure(list(date = "Fri, 19 May 2023 05:50:55 GMT", `content-type` = "text/plain; charset=utf-8", `content-length` = "21", - `x-amzn-requestid` = "e7c91009-5e37-44bd-a441-80742ccfdf74", - `x-amzn-remapped-content-length` = "21", `x-amz-apigw-id` = "FJoAQFsDSwMFbnA=", - `x-amzn-trace-id` = "Root=1-6466ed34-616fd7d016f61c3b72584f47;Sampled=0;lineage=31aaf29f:0"), class = c("insensitive", + `x-amzn-requestid` = "a0190d2d-2115-4662-945b-6ae1567897fc", + `x-amzn-remapped-content-length` = "21", `x-amz-apigw-id` = "FJ8p_H84ywMFWIQ=", + `x-amzn-trace-id` = "Root=1-64670e3f-0f303f32637c42770dde5b8a;Sampled=0;lineage=31aaf29f:0"), class = c("insensitive", "list")))), cookies = structure(list(domain = logical(0), flag = logical(0), path = logical(0), secure = logical(0), expiration = structure(numeric(0), class = c("POSIXct", "POSIXt")), name = logical(0), value = logical(0)), row.names = integer(0), class = "data.frame"), - content = charToRaw("Internal Server Error"), date = structure(1684466996, class = c("POSIXct", - "POSIXt"), tzone = "GMT"), times = c(redirect = 0, namelookup = 0.000172, - connect = 0, pretransfer = 0.000249, starttransfer = 0.151445, - total = 0.151627)), class = "response") + content = charToRaw("Internal Server Error"), date = structure(1684475455, class = c("POSIXct", + "POSIXt"), tzone = "GMT"), times = c(redirect = 0, namelookup = 3.7e-05, + connect = 0, pretransfer = 0.000146, starttransfer = 0.146226, + total = 0.146561)), class = "response") diff --git a/tests/api/Wrong-filters-pagedata/a/5c09bf93f315d/data-3f57c4.R b/tests/api/Wrong-filters-pagedata/a/5c09bf93f315d/data-3f57c4.R index e2b6613..0696911 100644 --- a/tests/api/Wrong-filters-pagedata/a/5c09bf93f315d/data-3f57c4.R +++ b/tests/api/Wrong-filters-pagedata/a/5c09bf93f315d/data-3f57c4.R @@ -1,21 +1,21 @@ structure(list(url = "https://api.aims.gov.au/data-v2.0/10.25845/5c09bf93f315d/data?series=2687", - status_code = 422L, headers = structure(list(date = "Fri, 19 May 2023 03:36:19 GMT", + status_code = 422L, headers = structure(list(date = "Fri, 19 May 2023 05:57:11 GMT", `content-type` = "application/json", `content-length` = "176", - `x-amzn-requestid` = "c248aa8a-df40-4fa1-8ba8-9e346d5f815f", - `x-amzn-remapped-content-length` = "176", `x-amz-apigw-id` = "FJo8FGv-ywMFYGg=", - `x-amzn-trace-id` = "Root=1-6466eeb3-5eb001192634e611511939e6;Sampled=0;lineage=31aaf29f:0"), class = c("insensitive", + `x-amzn-requestid` = "5f380260-8f5d-44da-8435-b1132a3ad633", + `x-amzn-remapped-content-length` = "176", `x-amz-apigw-id` = "FJ9ktETkSwMFcuQ=", + `x-amzn-trace-id` = "Root=1-64670fb7-0e081065431dbe33401f0f0a;Sampled=0;lineage=31aaf29f:0"), class = c("insensitive", "list")), all_headers = list(list(status = 422L, version = "HTTP/2", - headers = structure(list(date = "Fri, 19 May 2023 03:36:19 GMT", + headers = structure(list(date = "Fri, 19 May 2023 05:57:11 GMT", `content-type` = "application/json", `content-length` = "176", - `x-amzn-requestid` = "c248aa8a-df40-4fa1-8ba8-9e346d5f815f", - `x-amzn-remapped-content-length` = "176", `x-amz-apigw-id` = "FJo8FGv-ywMFYGg=", - `x-amzn-trace-id` = "Root=1-6466eeb3-5eb001192634e611511939e6;Sampled=0;lineage=31aaf29f:0"), class = c("insensitive", + `x-amzn-requestid` = "5f380260-8f5d-44da-8435-b1132a3ad633", + `x-amzn-remapped-content-length` = "176", `x-amz-apigw-id` = "FJ9ktETkSwMFcuQ=", + `x-amzn-trace-id` = "Root=1-64670fb7-0e081065431dbe33401f0f0a;Sampled=0;lineage=31aaf29f:0"), class = c("insensitive", "list")))), cookies = structure(list(domain = logical(0), flag = logical(0), path = logical(0), secure = logical(0), expiration = structure(numeric(0), class = c("POSIXct", "POSIXt")), name = logical(0), value = logical(0)), row.names = integer(0), class = "data.frame"), content = charToRaw("{\"detail\":[{\"loc\":[\"query\",\"from_date\"],\"msg\":\"field required\",\"type\":\"value_error.missing\"},{\"loc\":[\"query\",\"thru_date\"],\"msg\":\"field required\",\"type\":\"value_error.missing\"}]}"), - date = structure(1684467379, class = c("POSIXct", "POSIXt" - ), tzone = "GMT"), times = c(redirect = 0, namelookup = 2.6e-05, - connect = 0, pretransfer = 0.000123, starttransfer = 0.165076, - total = 0.165162)), class = "response") + date = structure(1684475831, class = c("POSIXct", "POSIXt" + ), tzone = "GMT"), times = c(redirect = 0, namelookup = 2.7e-05, + connect = 0, pretransfer = 9.7e-05, starttransfer = 0.145398, + total = 0.145453)), class = "response") diff --git a/tests/api/Wrong-filters-pagedata/a/5c09bf93f315d/data-aa36ae.R b/tests/api/Wrong-filters-pagedata/a/5c09bf93f315d/data-aa36ae.R index 175c0b5..77f121d 100644 --- a/tests/api/Wrong-filters-pagedata/a/5c09bf93f315d/data-aa36ae.R +++ b/tests/api/Wrong-filters-pagedata/a/5c09bf93f315d/data-aa36ae.R @@ -1,20 +1,20 @@ structure(list(url = "https://api.aims.gov.au/data-v2.0/10.25845/5c09bf93f315d/data?series_id=2687&from_date=1900-01-01&thru_date=1900-01-10", - status_code = 500L, headers = structure(list(date = "Fri, 19 May 2023 03:36:19 GMT", + status_code = 500L, headers = structure(list(date = "Fri, 19 May 2023 05:57:11 GMT", `content-type` = "text/plain; charset=utf-8", `content-length` = "21", - `x-amzn-requestid` = "23273b1d-4a61-4815-b519-fe37a5576138", - `x-amzn-remapped-content-length` = "21", `x-amz-apigw-id` = "FJo8HE4JywMFaAA=", - `x-amzn-trace-id` = "Root=1-6466eeb3-1dd3a891190586f664c8bc89;Sampled=0;lineage=31aaf29f:0"), class = c("insensitive", + `x-amzn-requestid` = "824b7281-c4e9-4173-a31d-ada3ef3e510c", + `x-amzn-remapped-content-length` = "21", `x-amz-apigw-id` = "FJ9kvHlzSwMF6zw=", + `x-amzn-trace-id` = "Root=1-64670fb7-5daa8ec65c0afa4c66e243fa;Sampled=0;lineage=31aaf29f:0"), class = c("insensitive", "list")), all_headers = list(list(status = 500L, version = "HTTP/2", - headers = structure(list(date = "Fri, 19 May 2023 03:36:19 GMT", + headers = structure(list(date = "Fri, 19 May 2023 05:57:11 GMT", `content-type` = "text/plain; charset=utf-8", `content-length` = "21", - `x-amzn-requestid` = "23273b1d-4a61-4815-b519-fe37a5576138", - `x-amzn-remapped-content-length` = "21", `x-amz-apigw-id` = "FJo8HE4JywMFaAA=", - `x-amzn-trace-id` = "Root=1-6466eeb3-1dd3a891190586f664c8bc89;Sampled=0;lineage=31aaf29f:0"), class = c("insensitive", + `x-amzn-requestid` = "824b7281-c4e9-4173-a31d-ada3ef3e510c", + `x-amzn-remapped-content-length` = "21", `x-amz-apigw-id` = "FJ9kvHlzSwMF6zw=", + `x-amzn-trace-id` = "Root=1-64670fb7-5daa8ec65c0afa4c66e243fa;Sampled=0;lineage=31aaf29f:0"), class = c("insensitive", "list")))), cookies = structure(list(domain = logical(0), flag = logical(0), path = logical(0), secure = logical(0), expiration = structure(numeric(0), class = c("POSIXct", "POSIXt")), name = logical(0), value = logical(0)), row.names = integer(0), class = "data.frame"), - content = charToRaw("Internal Server Error"), date = structure(1684467379, class = c("POSIXct", - "POSIXt"), tzone = "GMT"), times = c(redirect = 0, namelookup = 5.5e-05, - connect = 0, pretransfer = 0.000295, starttransfer = 0.1582, - total = 0.158513)), class = "response") + content = charToRaw("Internal Server Error"), date = structure(1684475831, class = c("POSIXct", + "POSIXt"), tzone = "GMT"), times = c(redirect = 0, namelookup = 2.5e-05, + connect = 0, pretransfer = 0.000122, starttransfer = 0.154859, + total = 0.154926)), class = "response") diff --git a/tests/api/summary-requests-pagedata/a/5c09bf93f315d/data/summary-by-deployment.R b/tests/api/summary-requests-pagedata/a/5c09bf93f315d/data/summary-by-deployment.R index f73523e..f62a188 100644 --- a/tests/api/summary-requests-pagedata/a/5c09bf93f315d/data/summary-by-deployment.R +++ b/tests/api/summary-requests-pagedata/a/5c09bf93f315d/data/summary-by-deployment.R @@ -1,21 +1,21 @@ structure(list(url = "https://api.aims.gov.au/data-v2.0/10.25845/5c09bf93f315d/data/summary-by-deployment", - status_code = 403L, headers = structure(list(date = "Fri, 19 May 2023 03:36:20 GMT", + status_code = 403L, headers = structure(list(date = "Fri, 19 May 2023 05:57:11 GMT", `content-type` = "application/json", `content-length` = "42", - `x-amzn-requestid` = "ba05b33a-9243-4b0c-be6a-d9020c6b3cae", + `x-amzn-requestid` = "bbdc7293-6804-4ddd-a699-b15ec7c5e6a9", `x-amzn-errortype` = "MissingAuthenticationTokenException", - `x-amz-apigw-id` = "FJo8LHzkSwMFWpQ="), class = c("insensitive", + `x-amz-apigw-id` = "FJ9kyH44SwMFnAA="), class = c("insensitive", "list")), all_headers = list(list(status = 403L, version = "HTTP/2", - headers = structure(list(date = "Fri, 19 May 2023 03:36:20 GMT", + headers = structure(list(date = "Fri, 19 May 2023 05:57:11 GMT", `content-type` = "application/json", `content-length` = "42", - `x-amzn-requestid` = "ba05b33a-9243-4b0c-be6a-d9020c6b3cae", + `x-amzn-requestid` = "bbdc7293-6804-4ddd-a699-b15ec7c5e6a9", `x-amzn-errortype` = "MissingAuthenticationTokenException", - `x-amz-apigw-id` = "FJo8LHzkSwMFWpQ="), class = c("insensitive", + `x-amz-apigw-id` = "FJ9kyH44SwMFnAA="), class = c("insensitive", "list")))), cookies = structure(list(domain = logical(0), flag = logical(0), path = logical(0), secure = logical(0), expiration = structure(numeric(0), class = c("POSIXct", "POSIXt")), name = logical(0), value = logical(0)), row.names = integer(0), class = "data.frame"), content = charToRaw("{\"message\":\"Missing Authentication Token\"}"), - date = structure(1684467380, class = c("POSIXct", "POSIXt" - ), tzone = "GMT"), times = c(redirect = 0, namelookup = 0.000112, - connect = 0, pretransfer = 0.000154, starttransfer = 0.062463, - total = 0.062605)), class = "response") + date = structure(1684475831, class = c("POSIXct", "POSIXt" + ), tzone = "GMT"), times = c(redirect = 0, namelookup = 2e-05, + connect = 0, pretransfer = 8.1e-05, starttransfer = 0.064992, + total = 0.065042)), class = "response") diff --git a/tests/api/summary-requests-pagedata/a/5c09bf93f315d/data/summary-by-series.R b/tests/api/summary-requests-pagedata/a/5c09bf93f315d/data/summary-by-series.R index b825849..171498e 100644 --- a/tests/api/summary-requests-pagedata/a/5c09bf93f315d/data/summary-by-series.R +++ b/tests/api/summary-requests-pagedata/a/5c09bf93f315d/data/summary-by-series.R @@ -1,21 +1,21 @@ structure(list(url = "https://api.aims.gov.au/data-v2.0/10.25845/5c09bf93f315d/data/summary-by-series", - status_code = 403L, headers = structure(list(date = "Fri, 19 May 2023 03:36:20 GMT", + status_code = 403L, headers = structure(list(date = "Fri, 19 May 2023 05:57:11 GMT", `content-type` = "application/json", `content-length` = "42", - `x-amzn-requestid` = "6a90bd65-de39-4090-ad2e-4236ad02edcf", + `x-amzn-requestid` = "74c4b9ef-3d4b-4c39-9b9d-6a3490427a2e", `x-amzn-errortype` = "MissingAuthenticationTokenException", - `x-amz-apigw-id` = "FJo8LEL8SwMFbkA="), class = c("insensitive", + `x-amz-apigw-id` = "FJ9kxG-BywMF9sA="), class = c("insensitive", "list")), all_headers = list(list(status = 403L, version = "HTTP/2", - headers = structure(list(date = "Fri, 19 May 2023 03:36:20 GMT", + headers = structure(list(date = "Fri, 19 May 2023 05:57:11 GMT", `content-type` = "application/json", `content-length` = "42", - `x-amzn-requestid` = "6a90bd65-de39-4090-ad2e-4236ad02edcf", + `x-amzn-requestid` = "74c4b9ef-3d4b-4c39-9b9d-6a3490427a2e", `x-amzn-errortype` = "MissingAuthenticationTokenException", - `x-amz-apigw-id` = "FJo8LEL8SwMFbkA="), class = c("insensitive", + `x-amz-apigw-id` = "FJ9kxG-BywMF9sA="), class = c("insensitive", "list")))), cookies = structure(list(domain = logical(0), flag = logical(0), path = logical(0), secure = logical(0), expiration = structure(numeric(0), class = c("POSIXct", "POSIXt")), name = logical(0), value = logical(0)), row.names = integer(0), class = "data.frame"), content = charToRaw("{\"message\":\"Missing Authentication Token\"}"), - date = structure(1684467380, class = c("POSIXct", "POSIXt" - ), tzone = "GMT"), times = c(redirect = 0, namelookup = 2.8e-05, - connect = 0, pretransfer = 1e-04, starttransfer = 0.063985, - total = 0.064044)), class = "response") + date = structure(1684475831, class = c("POSIXct", "POSIXt" + ), tzone = "GMT"), times = c(redirect = 0, namelookup = 2.7e-05, + connect = 0, pretransfer = 0.00011, starttransfer = 0.058772, + total = 0.058828)), class = "response")