diff --git a/tests/testthat.R b/tests/testthat.R index f9b1ae52..76487794 100644 --- a/tests/testthat.R +++ b/tests/testthat.R @@ -1,5 +1,4 @@ library(testthat) -library(httptest2) library(osmdata) test_check("osmdata") diff --git a/tests/testthat/mock_osm_sc/overpass-api.de/api/interpreter-f7f678-POST.R b/tests/testthat/mock_osm_sc/overpass-api.de/api/interpreter-f7f678-POST.R new file mode 100644 index 00000000..62e5341b --- /dev/null +++ b/tests/testthat/mock_osm_sc/overpass-api.de/api/interpreter-f7f678-POST.R @@ -0,0 +1,337 @@ +structure(list(method = "POST", url = "https://overpass-api.de/api/interpreter", + status_code = 200L, headers = structure(list(Date = "Sun, 05 Feb 2023 19:49:34 GMT", + Server = "Apache/2.4.18 (Ubuntu)", Vary = "Accept-Encoding", + `Content-Encoding` = "gzip", `Content-Length` = "910", + Connection = "close", `Content-Type` = "application/osm3s+xml"), class = "httr2_headers"), + body = as.raw(c(0x3c, 0x3f, 0x78, 0x6d, 0x6c, 0x20, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x31, 0x2e, + 0x30, 0x22, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, + 0x67, 0x3d, 0x22, 0x55, 0x54, 0x46, 0x2d, 0x38, 0x22, 0x3f, + 0x3e, 0x0a, 0x3c, 0x6f, 0x73, 0x6d, 0x20, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x30, 0x2e, 0x36, 0x22, + 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, + 0x3d, 0x22, 0x4f, 0x76, 0x65, 0x72, 0x70, 0x61, 0x73, 0x73, + 0x20, 0x41, 0x50, 0x49, 0x20, 0x30, 0x2e, 0x37, 0x2e, 0x35, + 0x39, 0x20, 0x65, 0x32, 0x31, 0x63, 0x33, 0x39, 0x66, 0x65, + 0x22, 0x3e, 0x0a, 0x3c, 0x6e, 0x6f, 0x74, 0x65, 0x3e, 0x54, + 0x68, 0x65, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x69, 0x6e, + 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, + 0x74, 0x68, 0x69, 0x73, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, + 0x65, 0x6e, 0x74, 0x20, 0x69, 0x73, 0x20, 0x66, 0x72, 0x6f, + 0x6d, 0x20, 0x77, 0x77, 0x77, 0x2e, 0x6f, 0x70, 0x65, 0x6e, + 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, + 0x6f, 0x72, 0x67, 0x2e, 0x20, 0x54, 0x68, 0x65, 0x20, 0x64, + 0x61, 0x74, 0x61, 0x20, 0x69, 0x73, 0x20, 0x6d, 0x61, 0x64, + 0x65, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, + 0x65, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x4f, 0x44, + 0x62, 0x4c, 0x2e, 0x3c, 0x2f, 0x6e, 0x6f, 0x74, 0x65, 0x3e, + 0x0a, 0x3c, 0x6d, 0x65, 0x74, 0x61, 0x20, 0x6f, 0x73, 0x6d, + 0x5f, 0x62, 0x61, 0x73, 0x65, 0x3d, 0x22, 0x32, 0x30, 0x32, + 0x32, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, + 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2f, 0x3e, + 0x0a, 0x0a, 0x20, 0x20, 0x3c, 0x6e, 0x6f, 0x64, 0x65, 0x20, + 0x69, 0x64, 0x3d, 0x22, 0x39, 0x34, 0x37, 0x35, 0x35, 0x31, + 0x39, 0x22, 0x20, 0x6c, 0x61, 0x74, 0x3d, 0x22, 0x35, 0x31, + 0x2e, 0x35, 0x31, 0x37, 0x32, 0x39, 0x32, 0x35, 0x22, 0x20, + 0x6c, 0x6f, 0x6e, 0x3d, 0x22, 0x2d, 0x30, 0x2e, 0x31, 0x31, + 0x35, 0x34, 0x37, 0x35, 0x35, 0x22, 0x2f, 0x3e, 0x0a, 0x20, + 0x20, 0x3c, 0x6e, 0x6f, 0x64, 0x65, 0x20, 0x69, 0x64, 0x3d, + 0x22, 0x32, 0x31, 0x35, 0x38, 0x33, 0x33, 0x34, 0x38, 0x22, + 0x20, 0x6c, 0x61, 0x74, 0x3d, 0x22, 0x35, 0x31, 0x2e, 0x35, + 0x31, 0x37, 0x31, 0x35, 0x33, 0x39, 0x22, 0x20, 0x6c, 0x6f, + 0x6e, 0x3d, 0x22, 0x2d, 0x30, 0x2e, 0x31, 0x31, 0x35, 0x38, + 0x33, 0x38, 0x39, 0x22, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x3c, + 0x6e, 0x6f, 0x64, 0x65, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x33, + 0x31, 0x33, 0x34, 0x30, 0x35, 0x33, 0x30, 0x35, 0x22, 0x20, + 0x6c, 0x61, 0x74, 0x3d, 0x22, 0x35, 0x31, 0x2e, 0x35, 0x31, + 0x36, 0x30, 0x33, 0x31, 0x34, 0x22, 0x20, 0x6c, 0x6f, 0x6e, + 0x3d, 0x22, 0x2d, 0x30, 0x2e, 0x31, 0x31, 0x35, 0x30, 0x30, + 0x32, 0x37, 0x22, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x3c, 0x6e, + 0x6f, 0x64, 0x65, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x33, 0x31, + 0x33, 0x34, 0x30, 0x35, 0x33, 0x30, 0x36, 0x22, 0x20, 0x6c, + 0x61, 0x74, 0x3d, 0x22, 0x35, 0x31, 0x2e, 0x35, 0x31, 0x36, + 0x35, 0x34, 0x30, 0x33, 0x22, 0x20, 0x6c, 0x6f, 0x6e, 0x3d, + 0x22, 0x2d, 0x30, 0x2e, 0x31, 0x31, 0x35, 0x33, 0x32, 0x33, + 0x34, 0x22, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x3c, 0x6e, 0x6f, + 0x64, 0x65, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x33, 0x31, 0x33, + 0x34, 0x30, 0x35, 0x33, 0x30, 0x37, 0x22, 0x20, 0x6c, 0x61, + 0x74, 0x3d, 0x22, 0x35, 0x31, 0x2e, 0x35, 0x31, 0x36, 0x33, + 0x30, 0x37, 0x34, 0x22, 0x20, 0x6c, 0x6f, 0x6e, 0x3d, 0x22, + 0x2d, 0x30, 0x2e, 0x31, 0x31, 0x36, 0x32, 0x37, 0x30, 0x35, + 0x22, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x3c, 0x6e, 0x6f, 0x64, + 0x65, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x33, 0x31, 0x33, 0x34, + 0x30, 0x35, 0x33, 0x31, 0x38, 0x22, 0x20, 0x6c, 0x61, 0x74, + 0x3d, 0x22, 0x35, 0x31, 0x2e, 0x35, 0x31, 0x35, 0x34, 0x31, + 0x31, 0x39, 0x22, 0x20, 0x6c, 0x6f, 0x6e, 0x3d, 0x22, 0x2d, + 0x30, 0x2e, 0x31, 0x31, 0x37, 0x34, 0x32, 0x31, 0x38, 0x22, + 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x3c, 0x6e, 0x6f, 0x64, 0x65, + 0x20, 0x69, 0x64, 0x3d, 0x22, 0x33, 0x31, 0x33, 0x34, 0x30, + 0x35, 0x35, 0x34, 0x32, 0x22, 0x20, 0x6c, 0x61, 0x74, 0x3d, + 0x22, 0x35, 0x31, 0x2e, 0x35, 0x31, 0x37, 0x30, 0x30, 0x30, + 0x32, 0x22, 0x20, 0x6c, 0x6f, 0x6e, 0x3d, 0x22, 0x2d, 0x30, + 0x2e, 0x31, 0x31, 0x35, 0x36, 0x32, 0x31, 0x34, 0x22, 0x2f, + 0x3e, 0x0a, 0x20, 0x20, 0x3c, 0x6e, 0x6f, 0x64, 0x65, 0x20, + 0x69, 0x64, 0x3d, 0x22, 0x33, 0x31, 0x33, 0x34, 0x30, 0x36, + 0x30, 0x31, 0x30, 0x22, 0x20, 0x6c, 0x61, 0x74, 0x3d, 0x22, + 0x35, 0x31, 0x2e, 0x35, 0x31, 0x36, 0x37, 0x37, 0x30, 0x34, + 0x22, 0x20, 0x6c, 0x6f, 0x6e, 0x3d, 0x22, 0x2d, 0x30, 0x2e, + 0x31, 0x31, 0x36, 0x39, 0x32, 0x30, 0x34, 0x22, 0x2f, 0x3e, + 0x0a, 0x20, 0x20, 0x3c, 0x6e, 0x6f, 0x64, 0x65, 0x20, 0x69, + 0x64, 0x3d, 0x22, 0x33, 0x33, 0x38, 0x35, 0x30, 0x31, 0x39, + 0x32, 0x32, 0x22, 0x20, 0x6c, 0x61, 0x74, 0x3d, 0x22, 0x35, + 0x31, 0x2e, 0x35, 0x31, 0x36, 0x36, 0x31, 0x35, 0x36, 0x22, + 0x20, 0x6c, 0x6f, 0x6e, 0x3d, 0x22, 0x2d, 0x30, 0x2e, 0x31, + 0x31, 0x35, 0x30, 0x35, 0x35, 0x32, 0x22, 0x2f, 0x3e, 0x0a, + 0x20, 0x20, 0x3c, 0x6e, 0x6f, 0x64, 0x65, 0x20, 0x69, 0x64, + 0x3d, 0x22, 0x33, 0x33, 0x38, 0x35, 0x30, 0x32, 0x32, 0x33, + 0x31, 0x22, 0x20, 0x6c, 0x61, 0x74, 0x3d, 0x22, 0x35, 0x31, + 0x2e, 0x35, 0x31, 0x37, 0x30, 0x33, 0x34, 0x31, 0x22, 0x20, + 0x6c, 0x6f, 0x6e, 0x3d, 0x22, 0x2d, 0x30, 0x2e, 0x31, 0x31, + 0x35, 0x35, 0x37, 0x38, 0x38, 0x22, 0x3e, 0x0a, 0x20, 0x20, + 0x20, 0x20, 0x3c, 0x74, 0x61, 0x67, 0x20, 0x6b, 0x3d, 0x22, + 0x62, 0x61, 0x72, 0x72, 0x69, 0x65, 0x72, 0x22, 0x20, 0x76, + 0x3d, 0x22, 0x67, 0x61, 0x74, 0x65, 0x22, 0x2f, 0x3e, 0x0a, + 0x20, 0x20, 0x3c, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x3e, 0x0a, + 0x20, 0x20, 0x3c, 0x6e, 0x6f, 0x64, 0x65, 0x20, 0x69, 0x64, + 0x3d, 0x22, 0x33, 0x33, 0x38, 0x35, 0x30, 0x34, 0x36, 0x32, + 0x32, 0x22, 0x20, 0x6c, 0x61, 0x74, 0x3d, 0x22, 0x35, 0x31, + 0x2e, 0x35, 0x31, 0x36, 0x30, 0x31, 0x36, 0x33, 0x22, 0x20, + 0x6c, 0x6f, 0x6e, 0x3d, 0x22, 0x2d, 0x30, 0x2e, 0x31, 0x31, + 0x34, 0x39, 0x36, 0x31, 0x37, 0x22, 0x3e, 0x0a, 0x20, 0x20, + 0x20, 0x20, 0x3c, 0x74, 0x61, 0x67, 0x20, 0x6b, 0x3d, 0x22, + 0x62, 0x61, 0x72, 0x72, 0x69, 0x65, 0x72, 0x22, 0x20, 0x76, + 0x3d, 0x22, 0x67, 0x61, 0x74, 0x65, 0x22, 0x2f, 0x3e, 0x0a, + 0x20, 0x20, 0x3c, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x3e, 0x0a, + 0x20, 0x20, 0x3c, 0x6e, 0x6f, 0x64, 0x65, 0x20, 0x69, 0x64, + 0x3d, 0x22, 0x33, 0x35, 0x34, 0x36, 0x37, 0x30, 0x32, 0x33, + 0x39, 0x22, 0x20, 0x6c, 0x61, 0x74, 0x3d, 0x22, 0x35, 0x31, + 0x2e, 0x35, 0x31, 0x35, 0x37, 0x31, 0x37, 0x37, 0x22, 0x20, + 0x6c, 0x6f, 0x6e, 0x3d, 0x22, 0x2d, 0x30, 0x2e, 0x31, 0x31, + 0x36, 0x32, 0x34, 0x31, 0x39, 0x22, 0x2f, 0x3e, 0x0a, 0x20, + 0x20, 0x3c, 0x6e, 0x6f, 0x64, 0x65, 0x20, 0x69, 0x64, 0x3d, + 0x22, 0x31, 0x37, 0x37, 0x39, 0x32, 0x33, 0x34, 0x35, 0x36, + 0x36, 0x22, 0x20, 0x6c, 0x61, 0x74, 0x3d, 0x22, 0x35, 0x31, + 0x2e, 0x35, 0x31, 0x36, 0x39, 0x39, 0x33, 0x30, 0x22, 0x20, + 0x6c, 0x6f, 0x6e, 0x3d, 0x22, 0x2d, 0x30, 0x2e, 0x31, 0x31, + 0x35, 0x34, 0x38, 0x35, 0x36, 0x22, 0x2f, 0x3e, 0x0a, 0x20, + 0x20, 0x3c, 0x6e, 0x6f, 0x64, 0x65, 0x20, 0x69, 0x64, 0x3d, + 0x22, 0x31, 0x37, 0x38, 0x33, 0x35, 0x35, 0x38, 0x32, 0x32, + 0x35, 0x22, 0x20, 0x6c, 0x61, 0x74, 0x3d, 0x22, 0x35, 0x31, + 0x2e, 0x35, 0x31, 0x35, 0x39, 0x38, 0x33, 0x39, 0x22, 0x20, + 0x6c, 0x6f, 0x6e, 0x3d, 0x22, 0x2d, 0x30, 0x2e, 0x31, 0x31, + 0x34, 0x39, 0x34, 0x32, 0x33, 0x22, 0x2f, 0x3e, 0x0a, 0x20, + 0x20, 0x3c, 0x6e, 0x6f, 0x64, 0x65, 0x20, 0x69, 0x64, 0x3d, + 0x22, 0x31, 0x37, 0x38, 0x33, 0x35, 0x35, 0x38, 0x32, 0x35, + 0x36, 0x22, 0x20, 0x6c, 0x61, 0x74, 0x3d, 0x22, 0x35, 0x31, + 0x2e, 0x35, 0x31, 0x36, 0x31, 0x36, 0x33, 0x30, 0x22, 0x20, + 0x6c, 0x6f, 0x6e, 0x3d, 0x22, 0x2d, 0x30, 0x2e, 0x31, 0x31, + 0x34, 0x37, 0x38, 0x34, 0x38, 0x22, 0x2f, 0x3e, 0x0a, 0x20, + 0x20, 0x3c, 0x6e, 0x6f, 0x64, 0x65, 0x20, 0x69, 0x64, 0x3d, + 0x22, 0x31, 0x39, 0x30, 0x35, 0x37, 0x35, 0x34, 0x30, 0x35, + 0x32, 0x22, 0x20, 0x6c, 0x61, 0x74, 0x3d, 0x22, 0x35, 0x31, + 0x2e, 0x35, 0x31, 0x36, 0x35, 0x37, 0x31, 0x37, 0x22, 0x20, + 0x6c, 0x6f, 0x6e, 0x3d, 0x22, 0x2d, 0x30, 0x2e, 0x31, 0x31, + 0x35, 0x32, 0x31, 0x31, 0x37, 0x22, 0x3e, 0x0a, 0x20, 0x20, + 0x20, 0x20, 0x3c, 0x74, 0x61, 0x67, 0x20, 0x6b, 0x3d, 0x22, + 0x62, 0x61, 0x72, 0x72, 0x69, 0x65, 0x72, 0x22, 0x20, 0x76, + 0x3d, 0x22, 0x67, 0x61, 0x74, 0x65, 0x22, 0x2f, 0x3e, 0x0a, + 0x20, 0x20, 0x3c, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x3e, 0x0a, + 0x20, 0x20, 0x3c, 0x6e, 0x6f, 0x64, 0x65, 0x20, 0x69, 0x64, + 0x3d, 0x22, 0x33, 0x31, 0x34, 0x30, 0x38, 0x35, 0x35, 0x33, + 0x37, 0x39, 0x22, 0x20, 0x6c, 0x61, 0x74, 0x3d, 0x22, 0x35, + 0x31, 0x2e, 0x35, 0x31, 0x35, 0x39, 0x33, 0x33, 0x35, 0x22, + 0x20, 0x6c, 0x6f, 0x6e, 0x3d, 0x22, 0x2d, 0x30, 0x2e, 0x31, + 0x31, 0x34, 0x36, 0x34, 0x37, 0x37, 0x22, 0x2f, 0x3e, 0x0a, + 0x20, 0x20, 0x3c, 0x6e, 0x6f, 0x64, 0x65, 0x20, 0x69, 0x64, + 0x3d, 0x22, 0x35, 0x38, 0x31, 0x37, 0x39, 0x36, 0x33, 0x33, + 0x34, 0x37, 0x22, 0x20, 0x6c, 0x61, 0x74, 0x3d, 0x22, 0x35, + 0x31, 0x2e, 0x35, 0x31, 0x35, 0x39, 0x37, 0x36, 0x36, 0x22, + 0x20, 0x6c, 0x6f, 0x6e, 0x3d, 0x22, 0x2d, 0x30, 0x2e, 0x31, + 0x31, 0x34, 0x36, 0x37, 0x34, 0x31, 0x22, 0x2f, 0x3e, 0x0a, + 0x20, 0x20, 0x3c, 0x6e, 0x6f, 0x64, 0x65, 0x20, 0x69, 0x64, + 0x3d, 0x22, 0x38, 0x37, 0x38, 0x35, 0x35, 0x36, 0x38, 0x32, + 0x35, 0x31, 0x22, 0x20, 0x6c, 0x61, 0x74, 0x3d, 0x22, 0x35, + 0x31, 0x2e, 0x35, 0x31, 0x35, 0x39, 0x33, 0x35, 0x30, 0x22, + 0x20, 0x6c, 0x6f, 0x6e, 0x3d, 0x22, 0x2d, 0x30, 0x2e, 0x31, + 0x31, 0x34, 0x37, 0x30, 0x37, 0x39, 0x22, 0x2f, 0x3e, 0x0a, + 0x20, 0x20, 0x3c, 0x6e, 0x6f, 0x64, 0x65, 0x20, 0x69, 0x64, + 0x3d, 0x22, 0x39, 0x33, 0x35, 0x32, 0x33, 0x33, 0x32, 0x33, + 0x30, 0x38, 0x22, 0x20, 0x6c, 0x61, 0x74, 0x3d, 0x22, 0x35, + 0x31, 0x2e, 0x35, 0x31, 0x37, 0x30, 0x32, 0x32, 0x38, 0x22, + 0x20, 0x6c, 0x6f, 0x6e, 0x3d, 0x22, 0x2d, 0x30, 0x2e, 0x31, + 0x31, 0x35, 0x37, 0x37, 0x32, 0x38, 0x22, 0x2f, 0x3e, 0x0a, + 0x20, 0x20, 0x3c, 0x6e, 0x6f, 0x64, 0x65, 0x20, 0x69, 0x64, + 0x3d, 0x22, 0x39, 0x33, 0x35, 0x32, 0x35, 0x33, 0x33, 0x33, + 0x32, 0x38, 0x22, 0x20, 0x6c, 0x61, 0x74, 0x3d, 0x22, 0x35, + 0x31, 0x2e, 0x35, 0x31, 0x37, 0x32, 0x32, 0x37, 0x34, 0x22, + 0x20, 0x6c, 0x6f, 0x6e, 0x3d, 0x22, 0x2d, 0x30, 0x2e, 0x31, + 0x31, 0x35, 0x35, 0x30, 0x31, 0x35, 0x22, 0x2f, 0x3e, 0x0a, + 0x20, 0x20, 0x3c, 0x77, 0x61, 0x79, 0x20, 0x69, 0x64, 0x3d, + 0x22, 0x34, 0x32, 0x35, 0x36, 0x39, 0x38, 0x32, 0x22, 0x3e, + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6e, 0x64, 0x20, 0x72, + 0x65, 0x66, 0x3d, 0x22, 0x39, 0x34, 0x37, 0x35, 0x35, 0x31, + 0x39, 0x22, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, + 0x6e, 0x64, 0x20, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x33, 0x33, + 0x38, 0x35, 0x30, 0x31, 0x39, 0x32, 0x32, 0x22, 0x2f, 0x3e, + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6e, 0x64, 0x20, 0x72, + 0x65, 0x66, 0x3d, 0x22, 0x31, 0x37, 0x38, 0x33, 0x35, 0x35, + 0x38, 0x32, 0x35, 0x36, 0x22, 0x2f, 0x3e, 0x0a, 0x20, 0x20, + 0x20, 0x20, 0x3c, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x66, 0x3d, + 0x22, 0x35, 0x38, 0x31, 0x37, 0x39, 0x36, 0x33, 0x33, 0x34, + 0x37, 0x22, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, + 0x6e, 0x64, 0x20, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x33, 0x31, + 0x34, 0x30, 0x38, 0x35, 0x35, 0x33, 0x37, 0x39, 0x22, 0x2f, + 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x74, 0x61, 0x67, + 0x20, 0x6b, 0x3d, 0x22, 0x68, 0x69, 0x67, 0x68, 0x77, 0x61, + 0x79, 0x22, 0x20, 0x76, 0x3d, 0x22, 0x75, 0x6e, 0x63, 0x6c, + 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x65, 0x64, 0x22, 0x2f, + 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x74, 0x61, 0x67, + 0x20, 0x6b, 0x3d, 0x22, 0x6c, 0x69, 0x74, 0x22, 0x20, 0x76, + 0x3d, 0x22, 0x79, 0x65, 0x73, 0x22, 0x2f, 0x3e, 0x0a, 0x20, + 0x20, 0x20, 0x20, 0x3c, 0x74, 0x61, 0x67, 0x20, 0x6b, 0x3d, + 0x22, 0x6d, 0x61, 0x78, 0x73, 0x70, 0x65, 0x65, 0x64, 0x22, + 0x20, 0x76, 0x3d, 0x22, 0x32, 0x30, 0x20, 0x6d, 0x70, 0x68, + 0x22, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x74, + 0x61, 0x67, 0x20, 0x6b, 0x3d, 0x22, 0x6e, 0x61, 0x6d, 0x65, + 0x22, 0x20, 0x76, 0x3d, 0x22, 0x4c, 0x69, 0x6e, 0x63, 0x6f, + 0x6c, 0x6e, 0x27, 0x73, 0x20, 0x49, 0x6e, 0x6e, 0x20, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x73, 0x22, 0x2f, 0x3e, 0x0a, 0x20, + 0x20, 0x20, 0x20, 0x3c, 0x74, 0x61, 0x67, 0x20, 0x6b, 0x3d, + 0x22, 0x6f, 0x6e, 0x65, 0x77, 0x61, 0x79, 0x22, 0x20, 0x76, + 0x3d, 0x22, 0x79, 0x65, 0x73, 0x22, 0x2f, 0x3e, 0x0a, 0x20, + 0x20, 0x20, 0x20, 0x3c, 0x74, 0x61, 0x67, 0x20, 0x6b, 0x3d, + 0x22, 0x73, 0x75, 0x72, 0x66, 0x61, 0x63, 0x65, 0x22, 0x20, + 0x76, 0x3d, 0x22, 0x61, 0x73, 0x70, 0x68, 0x61, 0x6c, 0x74, + 0x22, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x3c, 0x2f, 0x77, 0x61, + 0x79, 0x3e, 0x0a, 0x20, 0x20, 0x3c, 0x77, 0x61, 0x79, 0x20, + 0x69, 0x64, 0x3d, 0x22, 0x32, 0x38, 0x35, 0x33, 0x31, 0x32, + 0x35, 0x30, 0x22, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, + 0x6e, 0x64, 0x20, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x33, 0x31, + 0x33, 0x34, 0x30, 0x35, 0x35, 0x34, 0x32, 0x22, 0x2f, 0x3e, + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6e, 0x64, 0x20, 0x72, + 0x65, 0x66, 0x3d, 0x22, 0x39, 0x33, 0x35, 0x32, 0x33, 0x33, + 0x32, 0x33, 0x30, 0x38, 0x22, 0x2f, 0x3e, 0x0a, 0x20, 0x20, + 0x20, 0x20, 0x3c, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x66, 0x3d, + 0x22, 0x33, 0x31, 0x33, 0x34, 0x30, 0x36, 0x30, 0x31, 0x30, + 0x22, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x74, + 0x61, 0x67, 0x20, 0x6b, 0x3d, 0x22, 0x66, 0x6f, 0x6f, 0x74, + 0x22, 0x20, 0x76, 0x3d, 0x22, 0x79, 0x65, 0x73, 0x22, 0x2f, + 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x74, 0x61, 0x67, + 0x20, 0x6b, 0x3d, 0x22, 0x68, 0x69, 0x67, 0x68, 0x77, 0x61, + 0x79, 0x22, 0x20, 0x76, 0x3d, 0x22, 0x66, 0x6f, 0x6f, 0x74, + 0x77, 0x61, 0x79, 0x22, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x3c, + 0x2f, 0x77, 0x61, 0x79, 0x3e, 0x0a, 0x20, 0x20, 0x3c, 0x77, + 0x61, 0x79, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x33, 0x30, 0x36, + 0x31, 0x33, 0x33, 0x32, 0x39, 0x22, 0x3e, 0x0a, 0x20, 0x20, + 0x20, 0x20, 0x3c, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x66, 0x3d, + 0x22, 0x33, 0x33, 0x38, 0x35, 0x30, 0x31, 0x39, 0x32, 0x32, + 0x22, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6e, + 0x64, 0x20, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x31, 0x39, 0x30, + 0x35, 0x37, 0x35, 0x34, 0x30, 0x35, 0x32, 0x22, 0x2f, 0x3e, + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6e, 0x64, 0x20, 0x72, + 0x65, 0x66, 0x3d, 0x22, 0x33, 0x31, 0x33, 0x34, 0x30, 0x35, + 0x33, 0x30, 0x36, 0x22, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x20, + 0x20, 0x3c, 0x74, 0x61, 0x67, 0x20, 0x6b, 0x3d, 0x22, 0x66, + 0x6f, 0x6f, 0x74, 0x22, 0x20, 0x76, 0x3d, 0x22, 0x79, 0x65, + 0x73, 0x22, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, + 0x74, 0x61, 0x67, 0x20, 0x6b, 0x3d, 0x22, 0x68, 0x69, 0x67, + 0x68, 0x77, 0x61, 0x79, 0x22, 0x20, 0x76, 0x3d, 0x22, 0x66, + 0x6f, 0x6f, 0x74, 0x77, 0x61, 0x79, 0x22, 0x2f, 0x3e, 0x0a, + 0x20, 0x20, 0x3c, 0x2f, 0x77, 0x61, 0x79, 0x3e, 0x0a, 0x20, + 0x20, 0x3c, 0x77, 0x61, 0x79, 0x20, 0x69, 0x64, 0x3d, 0x22, + 0x33, 0x31, 0x36, 0x39, 0x34, 0x30, 0x37, 0x33, 0x22, 0x3e, + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6e, 0x64, 0x20, 0x72, + 0x65, 0x66, 0x3d, 0x22, 0x33, 0x31, 0x33, 0x34, 0x30, 0x35, + 0x33, 0x31, 0x38, 0x22, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x20, + 0x20, 0x3c, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x66, 0x3d, 0x22, + 0x33, 0x35, 0x34, 0x36, 0x37, 0x30, 0x32, 0x33, 0x39, 0x22, + 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6e, 0x64, + 0x20, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x33, 0x31, 0x33, 0x34, + 0x30, 0x35, 0x33, 0x30, 0x35, 0x22, 0x2f, 0x3e, 0x0a, 0x20, + 0x20, 0x20, 0x20, 0x3c, 0x74, 0x61, 0x67, 0x20, 0x6b, 0x3d, + 0x22, 0x66, 0x6f, 0x6f, 0x74, 0x22, 0x20, 0x76, 0x3d, 0x22, + 0x79, 0x65, 0x73, 0x22, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x20, + 0x20, 0x3c, 0x74, 0x61, 0x67, 0x20, 0x6b, 0x3d, 0x22, 0x68, + 0x69, 0x67, 0x68, 0x77, 0x61, 0x79, 0x22, 0x20, 0x76, 0x3d, + 0x22, 0x66, 0x6f, 0x6f, 0x74, 0x77, 0x61, 0x79, 0x22, 0x2f, + 0x3e, 0x0a, 0x20, 0x20, 0x3c, 0x2f, 0x77, 0x61, 0x79, 0x3e, + 0x0a, 0x20, 0x20, 0x3c, 0x77, 0x61, 0x79, 0x20, 0x69, 0x64, + 0x3d, 0x22, 0x34, 0x39, 0x37, 0x39, 0x37, 0x34, 0x34, 0x36, + 0x22, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6e, 0x64, + 0x20, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x33, 0x31, 0x33, 0x34, + 0x30, 0x35, 0x33, 0x30, 0x36, 0x22, 0x2f, 0x3e, 0x0a, 0x20, + 0x20, 0x20, 0x20, 0x3c, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x66, + 0x3d, 0x22, 0x33, 0x31, 0x33, 0x34, 0x30, 0x35, 0x35, 0x34, + 0x32, 0x22, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, + 0x74, 0x61, 0x67, 0x20, 0x6b, 0x3d, 0x22, 0x66, 0x6f, 0x6f, + 0x74, 0x22, 0x20, 0x76, 0x3d, 0x22, 0x79, 0x65, 0x73, 0x22, + 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x74, 0x61, + 0x67, 0x20, 0x6b, 0x3d, 0x22, 0x68, 0x69, 0x67, 0x68, 0x77, + 0x61, 0x79, 0x22, 0x20, 0x76, 0x3d, 0x22, 0x66, 0x6f, 0x6f, + 0x74, 0x77, 0x61, 0x79, 0x22, 0x2f, 0x3e, 0x0a, 0x20, 0x20, + 0x3c, 0x2f, 0x77, 0x61, 0x79, 0x3e, 0x0a, 0x20, 0x20, 0x3c, + 0x77, 0x61, 0x79, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x34, 0x39, + 0x37, 0x39, 0x37, 0x34, 0x34, 0x37, 0x22, 0x3e, 0x0a, 0x20, + 0x20, 0x20, 0x20, 0x3c, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x66, + 0x3d, 0x22, 0x33, 0x31, 0x33, 0x34, 0x30, 0x35, 0x33, 0x30, + 0x36, 0x22, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, + 0x6e, 0x64, 0x20, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x33, 0x31, + 0x33, 0x34, 0x30, 0x35, 0x33, 0x30, 0x37, 0x22, 0x2f, 0x3e, + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x74, 0x61, 0x67, 0x20, + 0x6b, 0x3d, 0x22, 0x66, 0x6f, 0x6f, 0x74, 0x22, 0x20, 0x76, + 0x3d, 0x22, 0x79, 0x65, 0x73, 0x22, 0x2f, 0x3e, 0x0a, 0x20, + 0x20, 0x20, 0x20, 0x3c, 0x74, 0x61, 0x67, 0x20, 0x6b, 0x3d, + 0x22, 0x68, 0x69, 0x67, 0x68, 0x77, 0x61, 0x79, 0x22, 0x20, + 0x76, 0x3d, 0x22, 0x66, 0x6f, 0x6f, 0x74, 0x77, 0x61, 0x79, + 0x22, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x3c, 0x2f, 0x77, 0x61, + 0x79, 0x3e, 0x0a, 0x20, 0x20, 0x3c, 0x77, 0x61, 0x79, 0x20, + 0x69, 0x64, 0x3d, 0x22, 0x31, 0x36, 0x36, 0x39, 0x36, 0x36, + 0x38, 0x39, 0x39, 0x22, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, + 0x3c, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x38, + 0x37, 0x38, 0x35, 0x35, 0x36, 0x38, 0x32, 0x35, 0x31, 0x22, + 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6e, 0x64, + 0x20, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x31, 0x37, 0x38, 0x33, + 0x35, 0x35, 0x38, 0x32, 0x32, 0x35, 0x22, 0x2f, 0x3e, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6e, 0x64, 0x20, 0x72, 0x65, + 0x66, 0x3d, 0x22, 0x33, 0x33, 0x38, 0x35, 0x30, 0x34, 0x36, + 0x32, 0x32, 0x22, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, + 0x3c, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x33, + 0x31, 0x33, 0x34, 0x30, 0x35, 0x33, 0x30, 0x35, 0x22, 0x2f, + 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6e, 0x64, 0x20, + 0x72, 0x65, 0x66, 0x3d, 0x22, 0x33, 0x31, 0x33, 0x34, 0x30, + 0x35, 0x33, 0x30, 0x36, 0x22, 0x2f, 0x3e, 0x0a, 0x20, 0x20, + 0x20, 0x20, 0x3c, 0x74, 0x61, 0x67, 0x20, 0x6b, 0x3d, 0x22, + 0x66, 0x6f, 0x6f, 0x74, 0x22, 0x20, 0x76, 0x3d, 0x22, 0x79, + 0x65, 0x73, 0x22, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, + 0x3c, 0x74, 0x61, 0x67, 0x20, 0x6b, 0x3d, 0x22, 0x68, 0x69, + 0x67, 0x68, 0x77, 0x61, 0x79, 0x22, 0x20, 0x76, 0x3d, 0x22, + 0x66, 0x6f, 0x6f, 0x74, 0x77, 0x61, 0x79, 0x22, 0x2f, 0x3e, + 0x0a, 0x20, 0x20, 0x3c, 0x2f, 0x77, 0x61, 0x79, 0x3e, 0x0a, + 0x20, 0x20, 0x3c, 0x77, 0x61, 0x79, 0x20, 0x69, 0x64, 0x3d, + 0x22, 0x31, 0x30, 0x31, 0x33, 0x37, 0x30, 0x35, 0x39, 0x35, + 0x33, 0x22, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6e, + 0x64, 0x20, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x32, 0x31, 0x35, + 0x38, 0x33, 0x33, 0x34, 0x38, 0x22, 0x2f, 0x3e, 0x0a, 0x20, + 0x20, 0x20, 0x20, 0x3c, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x66, + 0x3d, 0x22, 0x39, 0x33, 0x35, 0x32, 0x35, 0x33, 0x33, 0x33, + 0x32, 0x38, 0x22, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, + 0x3c, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x31, + 0x37, 0x37, 0x39, 0x32, 0x33, 0x34, 0x35, 0x36, 0x36, 0x22, + 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6e, 0x64, + 0x20, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x33, 0x33, 0x38, 0x35, + 0x30, 0x32, 0x32, 0x33, 0x31, 0x22, 0x2f, 0x3e, 0x0a, 0x20, + 0x20, 0x20, 0x20, 0x3c, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x66, + 0x3d, 0x22, 0x32, 0x31, 0x35, 0x38, 0x33, 0x33, 0x34, 0x38, + 0x22, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x74, + 0x61, 0x67, 0x20, 0x6b, 0x3d, 0x22, 0x61, 0x72, 0x65, 0x61, + 0x22, 0x20, 0x76, 0x3d, 0x22, 0x79, 0x65, 0x73, 0x22, 0x2f, + 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x74, 0x61, 0x67, + 0x20, 0x6b, 0x3d, 0x22, 0x68, 0x69, 0x67, 0x68, 0x77, 0x61, + 0x79, 0x22, 0x20, 0x76, 0x3d, 0x22, 0x70, 0x65, 0x64, 0x65, + 0x73, 0x74, 0x72, 0x69, 0x61, 0x6e, 0x22, 0x2f, 0x3e, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x3c, 0x74, 0x61, 0x67, 0x20, 0x6b, + 0x3d, 0x22, 0x73, 0x75, 0x72, 0x66, 0x61, 0x63, 0x65, 0x22, + 0x20, 0x76, 0x3d, 0x22, 0x70, 0x61, 0x76, 0x65, 0x64, 0x22, + 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x3c, 0x2f, 0x77, 0x61, 0x79, + 0x3e, 0x0a, 0x0a, 0x3c, 0x2f, 0x6f, 0x73, 0x6d, 0x3e, 0x0a + ))), class = "httr2_response") diff --git a/tests/testthat/mock_osm_sc/overpass-api.de/api/status.txt b/tests/testthat/mock_osm_sc/overpass-api.de/api/status.txt new file mode 100644 index 00000000..becfaf59 --- /dev/null +++ b/tests/testthat/mock_osm_sc/overpass-api.de/api/status.txt @@ -0,0 +1,6 @@ +Connected as: 123456789 +Current time: 2022-01-01T00:00:00Z +Announced endpoint: z.overpass-api.de/api/ +Rate limit: 3 +3 slots available now. +Currently running queries (pid, space limit, time limit, start time): diff --git a/tests/testthat/setup.R b/tests/testthat/setup.R new file mode 100644 index 00000000..4f61703e --- /dev/null +++ b/tests/testthat/setup.R @@ -0,0 +1,5 @@ +library(httptest2) + +set_overpass_url ("https://overpass-api.de/api/interpreter") + +test_all <- Sys.getenv ("GITHUB_WORKFLOW") != "R-CMD-check" diff --git a/tests/testthat/test-elevation.R b/tests/testthat/test-elevation.R index b2f63300..73418da5 100644 --- a/tests/testthat/test-elevation.R +++ b/tests/testthat/test-elevation.R @@ -1,10 +1,5 @@ has_internet <- curl::has_internet () -test_all <- (identical (Sys.getenv ("MPADGE_LOCAL"), "true") | - identical (Sys.getenv ("GITHUB_WORKFLOW"), "test-coverage")) - -set_overpass_url ("https://overpass-api.de/api/interpreter") - test_that ("elevation", { # elevation can't actually be tested, because it only works with a full SRTM diff --git a/tests/testthat/test-features.R b/tests/testthat/test-features.R index 6f1d7fb8..01c411a4 100644 --- a/tests/testthat/test-features.R +++ b/tests/testthat/test-features.R @@ -4,11 +4,6 @@ # small sample only. Post-process of features is done in the test call; tags are # done via separate fn defined below. -test_all <- (identical (Sys.getenv ("MPADGE_LOCAL"), "true") | - identical (Sys.getenv ("GITHUB_WORKFLOW"), "test-coverage")) - -set_overpass_url ("https://overpass-api.de/api/interpreter") - test_that ("available_features", { expect_error (available_features (1), "unused argument") diff --git a/tests/testthat/test-getbb.R b/tests/testthat/test-getbb.R index 2e95afbb..9b6b1822 100644 --- a/tests/testthat/test-getbb.R +++ b/tests/testthat/test-getbb.R @@ -1,10 +1,5 @@ has_internet <- curl::has_internet () -test_all <- (identical (Sys.getenv ("MPADGE_LOCAL"), "true") | - identical (Sys.getenv ("GITHUB_WORKFLOW"), "test-coverage")) - -set_overpass_url ("https://overpass-api.de/api/interpreter") - test_that ("bbox", { expect_error (bbox_to_string (), "bbox must be provided") diff --git a/tests/testthat/test-osmdata.R b/tests/testthat/test-osmdata.R index d8579377..3d263b24 100644 --- a/tests/testthat/test-osmdata.R +++ b/tests/testthat/test-osmdata.R @@ -1,10 +1,5 @@ has_internet <- curl::has_internet () -test_all <- (identical (Sys.getenv ("MPADGE_LOCAL"), "true") | - identical (Sys.getenv ("GITHUB_WORKFLOW"), "test-coverage")) - -set_overpass_url ("https://overpass-api.de/api/interpreter") - test_that ("query-construction", { q0 <- opq (bbox = c (-0.12, 51.51, -0.11, 51.52)) @@ -325,21 +320,30 @@ test_that ("make_query", { test_that ("query-no-quiet", { - qry <- opq (bbox = c (-0.118, 51.514, -0.115, 51.517)) + qry <- opq (bbox = c (-0.116, 51.516, -0.115, 51.517)) qry <- add_osm_feature (qry, key = "highway") - # switched off until mock results for httr2 reinstanted for #272 - # expect_message (x <- osmdata_xml (qry, quiet = FALSE), - # "Issuing query to Overpass API") if (test_all) { - # expect_message (x <- osmdata_sp (qry, quiet = FALSE), - # "Issuing query to Overpass API") - # expect_message (x <- osmdata_sf (qry, quiet = FALSE), - # "Issuing query to Overpass API") - # expect_message (x <- osmdata_sc (qry, quiet = FALSE), - # "Issuing query to Overpass API") - # expect_message (x <- osmdata_data_frame (qry, quiet = FALSE), - # "Issuing query to Overpass API") + with_mock_dir ("mock_osm_xml", { + expect_message (x <- osmdata_xml (qry, quiet = FALSE), + "Issuing query to Overpass API") + }) + with_mock_dir ("mock_osm_sp", { + expect_message (x <- osmdata_sp (qry, quiet = FALSE), + "Issuing query to Overpass API") + }) + with_mock_dir ("mock_osm_sf", { + expect_message (x <- osmdata_sf (qry, quiet = FALSE), + "Issuing query to Overpass API") + }) + with_mock_dir ("mock_osm_sc", { + expect_message (x <- osmdata_sc (qry, quiet = FALSE), + "Issuing query to Overpass API") + }) + with_mock_dir ("mock_osm_df", { + expect_message (x <- osmdata_data_frame (qry, quiet = FALSE), + "Issuing query to Overpass API") + }) } }) diff --git a/tests/testthat/test-unname.R b/tests/testthat/test-unname.R index 14847683..ab2cd87b 100644 --- a/tests/testthat/test-unname.R +++ b/tests/testthat/test-unname.R @@ -1,13 +1,9 @@ context ("unname-osmdata-sf") -has_internet <- curl::has_internet () -skip_if (!has_internet) - -test_all <- (identical (Sys.getenv ("MPADGE_LOCAL"), "true") | - identical (Sys.getenv ("GITHUB_WORKFLOW"), "test-coverage")) skip_if (!test_all) -set_overpass_url ("https://overpass-api.de/api/interpreter") +has_internet <- curl::has_internet () +skip_if (!has_internet) require (sf)