diff --git a/armadillo_azure-pipelines.yml b/armadillo_azure-pipelines.yml index 2fba0a0a..ebca240b 100644 --- a/armadillo_azure-pipelines.yml +++ b/armadillo_azure-pipelines.yml @@ -535,7 +535,6 @@ jobs: echo 'branch:'$(branchName) >> $(datetime).txt echo 'os:'$(lsb_release -ds) >> $(datetime).txt echo 'R:'$(R --version | head -n 1) >> $(datetime).txt - echo 'opal:'$(opal system --opal localhost:8443 --user administrator --password "datashield_test&" --version) >> $(datetime).txt workingDirectory: $(Pipeline.Workspace)/logs displayName: 'Write versions to file' diff --git a/tests/testthat.R b/tests/testthat.R index 389ee66c..b262d97d 100644 --- a/tests/testthat.R +++ b/tests/testthat.R @@ -9,5 +9,8 @@ library(testthat) library(dsBaseClient) -if (identical(Sys.getenv("NOT_CRAN"), "true")) +if (identical(Sys.getenv("NOT_CRAN"), "true")) { + ufq_opt <- base::options(useFancyQuotes = FALSE) test_check("dsBaseClient") + base::options(useFancyQuotes = ufq_opt) +} diff --git a/tests/testthat/data_files/obiba_opal-upload_testing_datasets.R b/tests/testthat/data_files/obiba_opal-upload_testing_datasets.R index ae79d2e6..2913e3ec 100644 --- a/tests/testthat/data_files/obiba_opal-upload_testing_datasets.R +++ b/tests/testthat/data_files/obiba_opal-upload_testing_datasets.R @@ -17,8 +17,8 @@ upload_testing_dataset_table <- function(opal, project_name, table_name, local_f opal.table_save(opal, data, project_name, table_name, id.name = "_row_id_", force = TRUE) } -# opal <- opal.login('administrator','datashield_test&', url='https://192.168.56.100:8443/', opts = list(ssl_verifyhost=0, ssl_verifypeer=0)) -opal <- opal.login('administrator','datashield_test&', url='https://localhost:8443/', opts = list(ssl_verifyhost=0, ssl_verifypeer=0)) +# opal <- opal.login('administrator','datashield_test&', url='https://192.168.56.100:8/', opts = list(ssl_verifyhost=0, ssl_verifypeer=0)) +opal <- opal.login('administrator','datashield_test&', url='http://localhost:8080/', opts = list()) upload_testing_dataset_table(opal, 'ANTHRO', 'anthro1', 'ANTHRO/anthro1.rda') upload_testing_dataset_table(opal, 'ANTHRO', 'anthro2', 'ANTHRO/anthro2.rda') diff --git a/tests/testthat/perf_files/armadillo_azure-pipeline_perf-profile.csv b/tests/testthat/perf_files/armadillo_azure-pipeline_perf-profile.csv index cd65d3d1..b72b58dd 100644 --- a/tests/testthat/perf_files/armadillo_azure-pipeline_perf-profile.csv +++ b/tests/testthat/perf_files/armadillo_azure-pipeline_perf-profile.csv @@ -26,4 +26,4 @@ "ds.numNA::perf::combine:0","23.58","0.5","2" "ds.sqrt::perf::0","16.83","0.5","2" "ds.unique::perf::combine:0","17.04","0.5","2" -"void::perf::void::0","52590","0.5","2" +"void::perf::void::0","52590","0.5","2" \ No newline at end of file diff --git a/tests/testthat/perf_files/armadillo_hp-laptop-quay_perf-profile.csv b/tests/testthat/perf_files/armadillo_hp-laptop-quay_perf-profile.csv new file mode 100644 index 00000000..89fe83c9 --- /dev/null +++ b/tests/testthat/perf_files/armadillo_hp-laptop-quay_perf-profile.csv @@ -0,0 +1,19 @@ +"refer_name","rate","lower_tolerance","upper_tolerance" +"conndisconn::perf::simple0","0.04918","0.5","2" +"ds.abs::perf::0","6.327","0.5","2" +"ds.asCharacter::perf::0","4.048","0.5","2" +"ds.asDataMatrix::perf::0","4.206","0.5","2" +"ds.asInteger::perf:0","4.309","0.5","2" +"ds.asList::perf:0","8.058","0.5","2" +"ds.asLogical::perf::0","4.793","0.5","2" +"ds.asMatrix::perf::0","4.840","0.5","2" +"ds.asNumeric::perf:0","6.555","0.5","2" +"ds.assign::perf::0","2.745","0.5","2" +"ds.class::perf::combine:0","3.261","0.5","2" +"ds.colnames::perf:0","2.404","0.5","2" +"ds.exists::perf::combine:0","6.342","0.5","2" +"ds.length::perf::combine:0","7.835","0.5","2" +"ds.mean::perf::combine:0","8.127","0.5","2" +"ds.mean::perf::split:0","8.109","0.5","2" +"ds.sqrt::perf::0","5.569","0.5","2" +"void::perf::void::0","20280.0","0.5","2" diff --git a/tests/testthat/perf_files/opal_azure-pipeline_perf-profile.csv b/tests/testthat/perf_files/opal_azure-pipeline_perf-profile.csv index 831ff8e8..b2c08e10 100644 --- a/tests/testthat/perf_files/opal_azure-pipeline_perf-profile.csv +++ b/tests/testthat/perf_files/opal_azure-pipeline_perf-profile.csv @@ -26,4 +26,4 @@ "ds.numNA::perf::combine:0","8.411","0.5","2" "ds.sqrt::perf::0","8.666","0.5","2" "ds.unique::perf::combine:0","8.656","0.5","2" -"void::perf::void::0","46340","0.5","2" +"void::perf::void::0","46340","0.5","2" \ No newline at end of file diff --git a/tests/testthat/perf_files/opal_hp-laptop-quay_perf-profile.csv b/tests/testthat/perf_files/opal_hp-laptop-quay_perf-profile.csv index 181814d3..78fc7157 100644 --- a/tests/testthat/perf_files/opal_hp-laptop-quay_perf-profile.csv +++ b/tests/testthat/perf_files/opal_hp-laptop-quay_perf-profile.csv @@ -26,4 +26,4 @@ "ds.numNA::perf::combine:0","25.46","0.5","2" "ds.sqrt::perf::0","2.686","0.5","2" "ds.unique::perf::combine:0","2.681","0.5","2" -"void::perf::void::0","20150","0.5","2" +"void::perf::void::0","20150","0.5","2" \ No newline at end of file diff --git a/tests/testthat/setup.R b/tests/testthat/setup.R index 5980e9df..02275ef1 100644 --- a/tests/testthat/setup.R +++ b/tests/testthat/setup.R @@ -33,6 +33,7 @@ source("connection_to_datasets/init_testing_datasets.R") source("connection_to_datasets/init_studies_datasets.R") source("connection_to_datasets/init_discordant_datasets.R") source("connection_to_datasets/init_mediation_datasets.R") -options(datashield.errors.print = FALSE) +base::options(datashield.errors.print = FALSE) +base::options(useFancyQuotes = FALSE) # context("setup - done") diff --git a/tests/testthat/test-smk_dgr-ds.asCharacter.R b/tests/testthat/test-smk_dgr-ds.asCharacter.R index 965d637a..224c8616 100644 --- a/tests/testthat/test-smk_dgr-ds.asCharacter.R +++ b/tests/testthat/test-smk_dgr-ds.asCharacter.R @@ -29,7 +29,14 @@ test_that("setup", { # context("ds.asCharacter::smk_dgr::simple test") test_that("simple test", { - expect_no_error(ds.asCharacter("D$LAB_TSC")) + res <- ds.asCharacter("D$LAB_TSC") + expect_equal(length(res), 0) + + newobj <- ds.DANGERvarsEXTRACT('ascharacter.newobj') + + expect_equal(length(newobj), 2) + expect_true(all(c("list") %in% class(newobj[[1]]))) + expect_true(all(c("data.frame") %in% class(newobj[[2]]))) }) #