Running ‘testthat.R’ [45s/86s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > test_check("dataone")
  Loading required package: dataone
  expected '>'
  XML declaration allowed only at the start of the document
  Premature end of data in tag allow line 21
  Premature end of data in tag accessPolicy line 10
  Premature end of data in tag systemMetadata line 2
  1. Error: D1Client getDataObject (@test.D1Client.R#98) -------------------------
  1: expected '>'
  2: XML declaration allowed only at the start of the document
  3: Premature end of data in tag allow line 21
  4: Premature end of data in tag accessPolicy line 10
  5: Premature end of data in tag systemMetadata line 2
  1: getDataObject(cli, pid) at testthat/test.D1Client.R:98
  2: getDataObject(cli, pid)
  3: .local(x, identifier, ...)
  4: getSystemMetadata(currentMN, identifier)
  5: getSystemMetadata(currentMN, identifier)
  6: .local(x, ...)
  7: warning(sprintf("Error getting SystemMetadata: %s\n", getErrorDescription(response)))
  8: sprintf("Error getting SystemMetadata: %s\n", getErrorDescription(response))
  9: getErrorDescription(response)
  10: getNodeSet(xmlParse(responseContent), "/error/description")
  11: xpathApply(doc, path, fun, ..., namespaces = namespaces, sessionEncoding = sessionEncoding, 
         addFinalizer = addFinalizer)
  12: xmlParse(responseContent)
  13: (function (msg, ...) 
     {
         if (length(grep("\\\n$", msg)) == 0) 
             paste(msg, "\n", sep = "")
         if (immediate) 
             cat(msg)
         if (length(msg) == 0) {
             e = simpleError(paste(1:length(messages), messages, sep = ": ", collapse = ""))
             class(e) = c(class, class(e))
             stop(e)
         }
         messages <<- c(messages, msg)
     })(character(0))
  
  expected '>'
  XML declaration allowed only at the start of the document
  Premature end of data in tag allow line 21
  Premature end of data in tag accessPolicy line 10
  Premature end of data in tag systemMetadata line 2
  2. Error: D1Client getD1Object works (@test.D1Client.R#312) --------------------
  1: expected '>'
  2: XML declaration allowed only at the start of the document
  3: Premature end of data in tag allow line 21
  4: Premature end of data in tag accessPolicy line 10
  5: Premature end of data in tag systemMetadata line 2
  1: suppressWarnings(dataObj <- getD1Object(d1c, pid)) at testthat/test.D1Client.R:312
  2: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  3: getD1Object(d1c, pid)
  4: getD1Object(d1c, pid)
  5: .local(x, identifier, ...)
  6: getDataObject(x, identifier)
  7: getDataObject(x, identifier)
  8: .local(x, identifier, ...)
  9: getSystemMetadata(currentMN, identifier)
  10: getSystemMetadata(currentMN, identifier)
  11: .local(x, ...)
  12: warning(sprintf("Error getting SystemMetadata: %s\n", getErrorDescription(response)))
  13: sprintf("Error getting SystemMetadata: %s\n", getErrorDescription(response))
  14: getErrorDescription(response)
  15: getNodeSet(xmlParse(responseContent), "/error/description")
  16: xpathApply(doc, path, fun, ..., namespaces = namespaces, sessionEncoding = sessionEncoding, 
         addFinalizer = addFinalizer)
  17: xmlParse(responseContent)
  18: (function (msg, ...) 
     {
         if (length(grep("\\\n$", msg)) == 0) 
             paste(msg, "\n", sep = "")
         if (immediate) 
             cat(msg)
         if (length(msg) == 0) {
             e = simpleError(paste(1:length(messages), messages, sep = ": ", collapse = ""))
             class(e) = c(class, class(e))
             stop(e)
         }
         messages <<- c(messages, msg)
     })(character(0))
  
  testthat results ================================================================
  OK: 188 SKIPPED: 31 FAILED: 2
  1. Error: D1Client getDataObject (@test.D1Client.R#98) 
  2. Error: D1Client getD1Object works (@test.D1Client.R#312) 
  
  Error: testthat unit tests failed
  Execution halted