Running ‘testthat.R’ [7s/9s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(Rnightlights)
  Creating data folder in temporary location /tmp/RtmpIxvDOI/.Rnightlights
  Data directory created /tmp/RtmpIxvDOI/.Rnightlights
  Rnightlights may require 3GB+. Run setupDataPath() to change the location
  Upgrading data directory to ver. 0.2.2
  Renaming tiles:
  No upgrade required
  Renaming data files:
  No upgrade required
  Renaming country rasters:
  No upgrade required
  Remove Old Zonal Files:
  No upgrade required
  Upgrade complete!
  > 
  > ## force tests to be executed if in dev release which we define as
  > ## having a sub-release, eg 0.9.15.5 is one whereas 0.9.16 is not
  > if (length(strsplit(packageDescription("Rnightlights")$Version, "\\.")[[1]]) > 3) {	# dev release, and
  +   if (Sys.getenv("RunAllTests") != "no") { 				# if env.var not explicitly set to no
  +     message("Setting \"RunAllTests\"=\"yes\" for development release\n")
  +     Sys.setenv("RunAllTests"="yes")
  +   }
  + }
  > 
  > test_check("Rnightlights")
  Attempting data directory move
  The directories are the same. Not changing
  Loading required package: sp
  rgdal: version: 1.3-4, (SVN revision 766)
   Geospatial Data Abstraction Library extensions to R successfully loaded
   Loaded GDAL runtime: GDAL 2.3.2, released 2018/09/21
   Path to GDAL shared files: /usr/share/gdal
   GDAL binary built with GEOS: TRUE 
   Loaded PROJ.4 runtime: Rel. 5.2.0, September 15th, 2018, [PJ_VERSION: 520]
   Path to PROJ.4 shared files: (autodetected)
   Linking to sp version: 1.3-1 
  PING google.com (216.58.201.110) 56(84) bytes of data.
  64 bytes from 216.58.201.110: icmp_seq=1 ttl=54 time=8.56 ms
  
  --- google.com ping statistics ---
  1 packets transmitted, 1 received, 0% packet loss, time 0ms
  rtt min/avg/max/mdev = 8.556/8.556/8.556/0.000 ms
  trying URL 'http://biogeo.ucdavis.edu/data/gadm2.8/shp/STP_adm_shp.zip'
  ── 1. Error: admLevel lookups work (@test-admlevels.R#10)  ─────────────────────
  Cannot open data source
  1: expect_equal(Rnightlights:::getCtryPolyAdmLevelNames("STP"), c("country", "Municipality_(Concelho)", 
         "District"), fixed = TRUE) at testthat/test-admlevels.R:10
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: Rnightlights:::getCtryPolyAdmLevelNames("STP")
  5: getCtryShpLowestLyrNames(ctryCodes = ctryCode, gadmVersion = gadmVersion, custPolyPath = custPolyPath)
  6: dnldCtryPoly(ctryCode = ctryCodes, gadmVersion = gadmVersion, custPolyPath = custPolyPath)
  7: sort(unlist(grep("adm", rgdal::ogrListLayers(getPolyFnamePath(ctryCode = ctryCode, 
         gadmVersion = gadmVersion, custPolyPath = custPolyPath)), value = T)))
  8: unlist(grep("adm", rgdal::ogrListLayers(getPolyFnamePath(ctryCode = ctryCode, gadmVersion = gadmVersion, 
         custPolyPath = custPolyPath)), value = T))
  9: grep("adm", rgdal::ogrListLayers(getPolyFnamePath(ctryCode = ctryCode, gadmVersion = gadmVersion, 
         custPolyPath = custPolyPath)), value = T)
  10: rgdal::ogrListLayers(getPolyFnamePath(ctryCode = ctryCode, gadmVersion = gadmVersion, 
         custPolyPath = custPolyPath))
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 50 SKIPPED: 1 FAILED: 1
  1. Error: admLevel lookups work (@test-admlevels.R#10) 
  
  Error: testthat unit tests failed
  Execution halted