@@ -18,7 +18,7 @@ test_that("inspire - metadata validator",{
18
18
19
19
apiKey <- Sys.getenv(" INSPIRE_API_KEY" )
20
20
if (nzchar(apiKey )){
21
- inspireValidator <- INSPIREMetadataValidator $ new(apiKey = apiKey )
21
+ inspireValidator <- INSPIREMetadataValidator $ new(url = Sys.getenv( " INSPIRE_API_ENDPOINT " ), apiKey = apiKey )
22
22
inspireReport <- inspireValidator $ getValidationReport(obj = md , raw = TRUE )
23
23
if (inspireValidator $ running ){
24
24
expect_is(inspireReport , " list" )
@@ -27,7 +27,7 @@ test_that("inspire - metadata validator",{
27
27
expect_null(inspireReport )
28
28
}
29
29
}else {
30
- inspireValidator <- INSPIREMetadataValidator $ new(apiKey = apiKey )
30
+ inspireValidator <- INSPIREMetadataValidator $ new(url = Sys.getenv( " INSPIRE_API_ENDPOINT " ), apiKey = apiKey )
31
31
expect_error(inspireValidator $ getValidationReport(obj = md , raw = TRUE ))
32
32
}
33
33
})
@@ -36,7 +36,7 @@ test_that("inspire - metadata validator 'encode' shortcut",{
36
36
testthat :: skip_on_cran()
37
37
apiKey <- Sys.getenv(" INSPIRE_API_KEY" )
38
38
if (nzchar(apiKey )){
39
- inspireValidator <- INSPIREMetadataValidator $ new(apiKey = apiKey )
39
+ inspireValidator <- INSPIREMetadataValidator $ new(url = Sys.getenv( " INSPIRE_API_ENDPOINT " ), apiKey = apiKey )
40
40
xml <- md $ encode(inspire = TRUE , inspireValidator = inspireValidator )
41
41
}
42
42
})
@@ -45,7 +45,7 @@ test_that("inspire - metadata validator 'save' shortcut",{
45
45
testthat :: skip_on_cran()
46
46
apiKey <- Sys.getenv(" INSPIRE_API_KEY" )
47
47
if (nzchar(apiKey )){
48
- inspireValidator <- INSPIREMetadataValidator $ new(apiKey = apiKey )
48
+ inspireValidator <- INSPIREMetadataValidator $ new(url = Sys.getenv( " INSPIRE_API_ENDPOINT " ), apiKey = apiKey )
49
49
md $ save(" my-metadata.xml" , inspire = TRUE , inspireValidator = inspireValidator )
50
50
}
51
51
})
0 commit comments