Running 'testthat.R' [8s/54s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library("testthat")
  > library("dataverse")
  > 
  > if (!requireNamespace("yaml", quietly = TRUE)) {
  +   warning("The 'yaml' package must be present to test the dataverse package.")
  + } else if (!requireNamespace("checkmate", quietly = TRUE)) {
  +   warning("The 'checkmate' package must be present to test the dataverse package.")
  + } else {
  +   server  <- Sys.getenv("DATAVERSE_SERVER")
  +   key     <- Sys.getenv("DATAVERSE_KEY")
  + 
  +   if (server == "" | key == "") {
  +     config  <- yaml::read_yaml(system.file("constants.yml", package="dataverse"))
  +     # config  <- yaml::read_yaml("inst/constants.yml")
  + 
  +     Sys.setenv("DATAVERSE_SERVER" = config$server)
  +     Sys.setenv("DATAVERSE_KEY"    = config$api_token)
  + 
  +     if (as.Date(config$api_token_expiration) < Sys.Date()) {
  +       stop(
  +         "The API token expired on `",
  +         config$api_token_expiration,
  +         "`, so the tests would probably fail.  ",
  +         "Please regenerate a new token and update `inst/constants.yml`"
  +       )
  +     }
  +     rm(config)
  +   }
  +   rm(server, key)
  + 
  +   message("Using Dataverse server `", Sys.getenv("DATAVERSE_SERVER"), "`.")
  + 
  +   test_check("dataverse")
  + }
  Using Dataverse server `demo.dataverse.org`.
  == Warnings ====================================================================
  -- Warning (tests-dataset_files.R:8:3): download tab from DOI and filename -----
  invalid input found on input connection '/home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/dataverse/dataset-basketball/expected-metadata.yml'
  Backtrace:
   1. yaml::read_yaml(...) tests-dataset_files.R:8:2
   3. base::readLines(file)
  -- Warning (tests-dataset_files.R:8:3): download tab from DOI and filename -----
  incomplete final line found on '/home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/dataverse/dataset-basketball/expected-metadata.yml'
  Backtrace:
   1. yaml::read_yaml(...) tests-dataset_files.R:8:2
   3. base::readLines(file)
  -- Warning (tests-get_dataframe-dataframe-basketball.R:5:3): roster-by-name ----
  invalid input found on input connection '/home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/dataverse/dataset-basketball/expected-metadata.yml'
  Backtrace:
   1. dataverse:::retrieve_info_dataset("dataset-basketball/expected-metadata.yml") tests-get_dataframe-dataframe-basketball.R:5:2
   2. yaml::read_yaml(system.file(path, package = "dataverse"))
   4. base::readLines(file)
  -- Warning (tests-get_dataframe-dataframe-basketball.R:5:3): roster-by-name ----
  incomplete final line found on '/home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/dataverse/dataset-basketball/expected-metadata.yml'
  Backtrace:
   1. dataverse:::retrieve_info_dataset("dataset-basketball/expected-metadata.yml") tests-get_dataframe-dataframe-basketball.R:5:2
   2. yaml::read_yaml(system.file(path, package = "dataverse"))
   4. base::readLines(file)
  -- Warning (tests-get_dataframe-dataframe-basketball.R:18:3): roster-by-doi ----
  invalid input found on input connection '/home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/dataverse/dataset-basketball/expected-metadata.yml'
  Backtrace:
   1. dataverse:::retrieve_info_dataset("dataset-basketball/expected-metadata.yml") tests-get_dataframe-dataframe-basketball.R:18:2
   2. yaml::read_yaml(system.file(path, package = "dataverse"))
   4. base::readLines(file)
  -- Warning (tests-get_dataframe-dataframe-basketball.R:18:3): roster-by-doi ----
  incomplete final line found on '/home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/dataverse/dataset-basketball/expected-metadata.yml'
  Backtrace:
   1. dataverse:::retrieve_info_dataset("dataset-basketball/expected-metadata.yml") tests-get_dataframe-dataframe-basketball.R:18:2
   2. yaml::read_yaml(system.file(path, package = "dataverse"))
   4. base::readLines(file)
  -- Warning (tests-get_dataframe-dataframe-basketball.R:30:3): roster-by-id -----
  invalid input found on input connection '/home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/dataverse/dataset-basketball/expected-metadata.yml'
  Backtrace:
   1. dataverse:::retrieve_info_dataset("dataset-basketball/expected-metadata.yml") tests-get_dataframe-dataframe-basketball.R:30:2
   2. yaml::read_yaml(system.file(path, package = "dataverse"))
   4. base::readLines(file)
  -- Warning (tests-get_dataframe-dataframe-basketball.R:30:3): roster-by-id -----
  incomplete final line found on '/home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/dataverse/dataset-basketball/expected-metadata.yml'
  Backtrace:
   1. dataverse:::retrieve_info_dataset("dataset-basketball/expected-metadata.yml") tests-get_dataframe-dataframe-basketball.R:30:2
   2. yaml::read_yaml(system.file(path, package = "dataverse"))
   4. base::readLines(file)
  -- Warning (tests-get_dataframe-original-basketball.R:20:3): roster-by-name ----
  invalid input found on input connection '/home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/dataverse/dataset-basketball/expected-metadata.yml'
  Backtrace:
   1. dataverse:::retrieve_info_dataset("dataset-basketball/expected-metadata.yml") tests-get_dataframe-original-basketball.R:20:2
   2. yaml::read_yaml(system.file(path, package = "dataverse"))
   4. base::readLines(file)
  -- Warning (tests-get_dataframe-original-basketball.R:20:3): roster-by-name ----
  incomplete final line found on '/home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/dataverse/dataset-basketball/expected-metadata.yml'
  Backtrace:
   1. dataverse:::retrieve_info_dataset("dataset-basketball/expected-metadata.yml") tests-get_dataframe-original-basketball.R:20:2
   2. yaml::read_yaml(system.file(path, package = "dataverse"))
   4. base::readLines(file)
  -- Warning (tests-get_dataframe-original-basketball.R:54:3): roster-by-doi -----
  invalid input found on input connection '/home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/dataverse/dataset-basketball/expected-metadata.yml'
  Backtrace:
   1. dataverse:::retrieve_info_dataset("dataset-basketball/expected-metadata.yml") tests-get_dataframe-original-basketball.R:54:2
   2. yaml::read_yaml(system.file(path, package = "dataverse"))
   4. base::readLines(file)
  -- Warning (tests-get_dataframe-original-basketball.R:54:3): roster-by-doi -----
  incomplete final line found on '/home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/dataverse/dataset-basketball/expected-metadata.yml'
  Backtrace:
   1. dataverse:::retrieve_info_dataset("dataset-basketball/expected-metadata.yml") tests-get_dataframe-original-basketball.R:54:2
   2. yaml::read_yaml(system.file(path, package = "dataverse"))
   4. base::readLines(file)
  -- Warning (tests-get_dataframe-original-basketball.R:74:3): roster-by-id ------
  invalid input found on input connection '/home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/dataverse/dataset-basketball/expected-metadata.yml'
  Backtrace:
   1. dataverse:::retrieve_info_dataset("dataset-basketball/expected-metadata.yml") tests-get_dataframe-original-basketball.R:74:2
   2. yaml::read_yaml(system.file(path, package = "dataverse"))
   4. base::readLines(file)
  -- Warning (tests-get_dataframe-original-basketball.R:74:3): roster-by-id ------
  incomplete final line found on '/home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/dataverse/dataset-basketball/expected-metadata.yml'
  Backtrace:
   1. dataverse:::retrieve_info_dataset("dataset-basketball/expected-metadata.yml") tests-get_dataframe-original-basketball.R:74:2
   2. yaml::read_yaml(system.file(path, package = "dataverse"))
   4. base::readLines(file)
  -- Warning (tests-get_dataframe-original-basketball.R:94:3): image-by-name -----
  invalid input found on input connection '/home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/dataverse/dataset-basketball/expected-metadata.yml'
  Backtrace:
   1. dataverse:::retrieve_info_dataset("dataset-basketball/expected-metadata.yml") tests-get_dataframe-original-basketball.R:94:2
   2. yaml::read_yaml(system.file(path, package = "dataverse"))
   4. base::readLines(file)
  -- Warning (tests-get_dataframe-original-basketball.R:94:3): image-by-name -----
  incomplete final line found on '/home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/dataverse/dataset-basketball/expected-metadata.yml'
  Backtrace:
   1. dataverse:::retrieve_info_dataset("dataset-basketball/expected-metadata.yml") tests-get_dataframe-original-basketball.R:94:2
   2. yaml::read_yaml(system.file(path, package = "dataverse"))
   4. base::readLines(file)
  -- Warning (tests-get_dataframe-original-basketball.R:112:3): image-by-doi -----
  invalid input found on input connection '/home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/dataverse/dataset-basketball/expected-metadata.yml'
  Backtrace:
   1. dataverse:::retrieve_info_dataset("dataset-basketball/expected-metadata.yml") tests-get_dataframe-original-basketball.R:112:2
   2. yaml::read_yaml(system.file(path, package = "dataverse"))
   4. base::readLines(file)
  -- Warning (tests-get_dataframe-original-basketball.R:112:3): image-by-doi -----
  incomplete final line found on '/home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/dataverse/dataset-basketball/expected-metadata.yml'
  Backtrace:
   1. dataverse:::retrieve_info_dataset("dataset-basketball/expected-metadata.yml") tests-get_dataframe-original-basketball.R:112:2
   2. yaml::read_yaml(system.file(path, package = "dataverse"))
   4. base::readLines(file)
  -- Warning (tests-get_dataframe-original-basketball.R:129:3): image-by-id ------
  invalid input found on input connection '/home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/dataverse/dataset-basketball/expected-metadata.yml'
  Backtrace:
   1. dataverse:::retrieve_info_dataset("dataset-basketball/expected-metadata.yml") tests-get_dataframe-original-basketball.R:129:2
   2. yaml::read_yaml(system.file(path, package = "dataverse"))
   4. base::readLines(file)
  -- Warning (tests-get_dataframe-original-basketball.R:129:3): image-by-id ------
  incomplete final line found on '/home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/dataverse/dataset-basketball/expected-metadata.yml'
  Backtrace:
   1. dataverse:::retrieve_info_dataset("dataset-basketball/expected-metadata.yml") tests-get_dataframe-original-basketball.R:129:2
   2. yaml::read_yaml(system.file(path, package = "dataverse"))
   4. base::readLines(file)
  
  == Failed tests ================================================================
  -- Error (tests-dataset_files.R:8:3): download tab from DOI and filename -------
  Error: (/home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/dataverse/dataset-basketball/expected-metadata.yml) Scanner error: while scanning a quoted scalar at line 27, column 14 found unexpected end of stream at line 30, column 79
  
  Backtrace:
      x
   1. \-yaml::read_yaml(...) tests-dataset_files.R:8:2
   2.   \-yaml::yaml.load(string, error.label = error.label, ...)
  -- Failure (tests-dataverse_contents.R:29:3): dataverse for 'dataverse-client-r' --
  actual[[1]] not equal to `expected`.
  Component "id": Mean relative difference: 6.343659e-06
  Component "identifier": 1 string mismatch
  Component "persistentUrl": 1 string mismatch
  Component "storageIdentifier": 1 string mismatch
  -- Error (tests-get_dataframe-dataframe-basketball.R:5:3): roster-by-name ------
  Error: (/home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/dataverse/dataset-basketball/expected-metadata.yml) Scanner error: while scanning a quoted scalar at line 27, column 14 found unexpected end of stream at line 30, column 79
  
  Backtrace:
      x
   1. \-dataverse:::retrieve_info_dataset("dataset-basketball/expected-metadata.yml") tests-get_dataframe-dataframe-basketball.R:5:2
   2.   \-yaml::read_yaml(system.file(path, package = "dataverse"))
   3.     \-yaml::yaml.load(string, error.label = error.label, ...)
  -- Error (tests-get_dataframe-dataframe-basketball.R:18:3): roster-by-doi ------
  Error: (/home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/dataverse/dataset-basketball/expected-metadata.yml) Scanner error: while scanning a quoted scalar at line 27, column 14 found unexpected end of stream at line 30, column 79
  
  Backtrace:
      x
   1. \-dataverse:::retrieve_info_dataset("dataset-basketball/expected-metadata.yml") tests-get_dataframe-dataframe-basketball.R:18:2
   2.   \-yaml::read_yaml(system.file(path, package = "dataverse"))
   3.     \-yaml::yaml.load(string, error.label = error.label, ...)
  -- Error (tests-get_dataframe-dataframe-basketball.R:30:3): roster-by-id -------
  Error: (/home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/dataverse/dataset-basketball/expected-metadata.yml) Scanner error: while scanning a quoted scalar at line 27, column 14 found unexpected end of stream at line 30, column 79
  
  Backtrace:
      x
   1. \-dataverse:::retrieve_info_dataset("dataset-basketball/expected-metadata.yml") tests-get_dataframe-dataframe-basketball.R:30:2
   2.   \-yaml::read_yaml(system.file(path, package = "dataverse"))
   3.     \-yaml::yaml.load(string, error.label = error.label, ...)
  -- Error (tests-get_dataframe-original-basketball.R:20:3): roster-by-name ------
  Error: (/home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/dataverse/dataset-basketball/expected-metadata.yml) Scanner error: while scanning a quoted scalar at line 27, column 14 found unexpected end of stream at line 30, column 79
  
  Backtrace:
      x
   1. \-dataverse:::retrieve_info_dataset("dataset-basketball/expected-metadata.yml") tests-get_dataframe-original-basketball.R:20:2
   2.   \-yaml::read_yaml(system.file(path, package = "dataverse"))
   3.     \-yaml::yaml.load(string, error.label = error.label, ...)
  -- Error (tests-get_dataframe-original-basketball.R:54:3): roster-by-doi -------
  Error: (/home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/dataverse/dataset-basketball/expected-metadata.yml) Scanner error: while scanning a quoted scalar at line 27, column 14 found unexpected end of stream at line 30, column 79
  
  Backtrace:
      x
   1. \-dataverse:::retrieve_info_dataset("dataset-basketball/expected-metadata.yml") tests-get_dataframe-original-basketball.R:54:2
   2.   \-yaml::read_yaml(system.file(path, package = "dataverse"))
   3.     \-yaml::yaml.load(string, error.label = error.label, ...)
  -- Error (tests-get_dataframe-original-basketball.R:74:3): roster-by-id --------
  Error: (/home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/dataverse/dataset-basketball/expected-metadata.yml) Scanner error: while scanning a quoted scalar at line 27, column 14 found unexpected end of stream at line 30, column 79
  
  Backtrace:
      x
   1. \-dataverse:::retrieve_info_dataset("dataset-basketball/expected-metadata.yml") tests-get_dataframe-original-basketball.R:74:2
   2.   \-yaml::read_yaml(system.file(path, package = "dataverse"))
   3.     \-yaml::yaml.load(string, error.label = error.label, ...)
  -- Error (tests-get_dataframe-original-basketball.R:94:3): image-by-name -------
  Error: (/home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/dataverse/dataset-basketball/expected-metadata.yml) Scanner error: while scanning a quoted scalar at line 27, column 14 found unexpected end of stream at line 30, column 79
  
  Backtrace:
      x
   1. \-dataverse:::retrieve_info_dataset("dataset-basketball/expected-metadata.yml") tests-get_dataframe-original-basketball.R:94:2
   2.   \-yaml::read_yaml(system.file(path, package = "dataverse"))
   3.     \-yaml::yaml.load(string, error.label = error.label, ...)
  -- Error (tests-get_dataframe-original-basketball.R:112:3): image-by-doi -------
  Error: (/home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/dataverse/dataset-basketball/expected-metadata.yml) Scanner error: while scanning a quoted scalar at line 27, column 14 found unexpected end of stream at line 30, column 79
  
  Backtrace:
      x
   1. \-dataverse:::retrieve_info_dataset("dataset-basketball/expected-metadata.yml") tests-get_dataframe-original-basketball.R:112:2
   2.   \-yaml::read_yaml(system.file(path, package = "dataverse"))
   3.     \-yaml::yaml.load(string, error.label = error.label, ...)
  -- Error (tests-get_dataframe-original-basketball.R:129:3): image-by-id --------
  Error: (/home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/dataverse/dataset-basketball/expected-metadata.yml) Scanner error: while scanning a quoted scalar at line 27, column 14 found unexpected end of stream at line 30, column 79
  
  Backtrace:
      x
   1. \-dataverse:::retrieve_info_dataset("dataset-basketball/expected-metadata.yml") tests-get_dataframe-original-basketball.R:129:2
   2.   \-yaml::read_yaml(system.file(path, package = "dataverse"))
   3.     \-yaml::yaml.load(string, error.label = error.label, ...)
  -- Failure (tests-get_dataset.R:12:3): download tab from DOI and filename ------
  actual$id not equal to 182158L.
  1/1 mismatches
  [1] 182162 - 182158 == 4
  -- Failure (tests-get_dataset.R:13:3): download tab from DOI and filename ------
  actual$datasetId not equal to 1734004L.
  1/1 mismatches
  [1] 1734015 - 1734004 == 11
  -- Failure (tests-get_dataset.R:14:3): download tab from DOI and filename ------
  actual$datasetPersistentId not equal to "doi:10.70122/FK2/HXJVJU".
  1/1 mismatches
  x[1]: "doi:10.70122/FK2/PPIAXE"
  y[1]: "doi:10.70122/FK2/HXJVJU"
  -- Failure (tests-get_dataset.R:15:3): download tab from DOI and filename ------
  actual$storageIdentifier not equal to "file://10.70122/FK2/HXJVJU".
  1/1 mismatches
  x[1]: "file://10.70122/FK2/PPIAXE"
  y[1]: "file://10.70122/FK2/HXJVJU"
  -- Failure (tests-get_dataset.R:17:3): download tab from DOI and filename ------
  actual$UNF not equal to "UNF:6:hrleySyT6vzwEih3+nhp8A==".
  1/1 mismatches
  x[1]: "UNF:6:KE0atkIJb5nmh7be7Gghdw=="
  y[1]: "UNF:6:hrleySyT6vzwEih3+nhp8A=="
  -- Failure (tests-get_dataset.R:23:3): download tab from DOI and filename ------
  files$label not equal to c("roster-bulls-1996.tab", "vector-basketball.svg").
  2/2 mismatches
  x[1]: "nlsw88_rds-export.rds"
  y[1]: "roster-bulls-1996.tab"
  
  x[2]: "nlsw88.tab"
  y[2]: "vector-basketball.svg"
  -- Failure (tests-get_dataset.R:25:3): download tab from DOI and filename ------
  files$version not equal to c(3L, 2L).
  2/2 mismatches (average diff: 1.5)
  [1] 1 - 3 == -2
  [2] 3 - 2 ==  1
  -- Failure (tests-get_dataset.R:27:3): download tab from DOI and filename ------
  files$directoryLabel not equal to c(NA, "resources").
  2/2 mismatches
  x[1]: "data-rds"
  y[1]: NA
  
  x[2]: "data-dta"
  y[2]: "resources"
  -- Failure (tests-get_dataset.R:28:3): download tab from DOI and filename ------
  files$id not equal to c(1734005L, 1734006L).
  2/2 mismatches (average diff: 11)
  [1] 1734016 - 1734005 == 11
  [2] 1734017 - 1734006 == 11
  -- Failure (tests-get_dataset.R:29:3): download tab from DOI and filename ------
  files$persistentId not equal to c("doi:10.70122/FK2/HXJVJU/SA3Z2V", "doi:10.70122/FK2/HXJVJU/FHV8ZB").
  2/2 mismatches
  x[1]: "doi:10.70122/FK2/PPIAXE/SUCFNI"
  y[1]: "doi:10.70122/FK2/HXJVJU/SA3Z2V"
  
  x[2]: "doi:10.70122/FK2/PPIAXE/MHDB0O"
  y[2]: "doi:10.70122/FK2/HXJVJU/FHV8ZB"
  -- Failure (tests-get_dataset.R:30:3): download tab from DOI and filename ------
  files$pidURL not equal to c("https://doi.org/10.70122/FK2/HXJVJU/SA3Z2V", "https://doi.org/10.70122/FK2/HXJVJU/FHV8ZB").
  2/2 mismatches
  x[1]: "https://doi.org/10.70122/FK2/PPIAXE/SUCFNI"
  y[1]: "https://doi.org/10.70122/FK2/HXJVJU/SA3Z2V"
  
  x[2]: "https://doi.org/10.70122/FK2/PPIAXE/MHDB0O"
  y[2]: "https://doi.org/10.70122/FK2/HXJVJU/FHV8ZB"
  -- Failure (tests-get_dataset.R:31:3): download tab from DOI and filename ------
  files$filename not equal to c("roster-bulls-1996.tab", "vector-basketball.svg").
  2/2 mismatches
  x[1]: "nlsw88_rds-export.rds"
  y[1]: "roster-bulls-1996.tab"
  
  x[2]: "nlsw88.tab"
  y[2]: "vector-basketball.svg"
  -- Failure (tests-list_datasets.R:60:3): dataverse for 'dataverse-client-r' ----
  `actual` not equal to `expected`.
  Component "datasets": Component "title": 2 string mismatches
  Component "datasets": Component "id": 2 string mismatches
  
  [ FAIL 24 | WARN 20 | SKIP 0 | PASS 48 ]
  Error: Test failures
  Execution halted