Running 'testthat.R' [22s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(Rnightlights)
  2019-10-06 08:56:15: Creating data folder in temporary location D:\temp\RtmpesKAmI/.Rnightlights
  2019-10-06 08:56:15: Data directory created D:\temp\RtmpesKAmI/.Rnightlights
  2019-10-06 08:56:15: Rnightlights may require 3GB+. Run setupDataPath() to change the location
  > 
  > ## 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")
  +   }
  + }
  > 
  > setup({
  +   #set the dataPath to tempdir() to ensure a clean environment for tests
  +   #thus forcing polygon and tile downloads and fresh raster
  +   #clipping and data extraction
  +   currDir <<- getNlDataPath()
  +   
  +   tempDir <<- tempdir()
  + 
  +   Rnightlights:::setNlDataPath(tempDir)
  + })
  2019-10-06 08:56:15: The directories are the same. Not changing
  > 
  > test_check("Rnightlights")
  Loading required package: sp
  rgdal: version: 1.4-6, (SVN revision 841)
   Geospatial Data Abstraction Library extensions to R successfully loaded
   Loaded GDAL runtime: GDAL 2.2.3, released 2017/11/20
   Path to GDAL shared files: D:/temp/RtmpU3KHBv/RLIBS_143983e5122e6/rgdal/gdal
   GDAL binary built with GEOS: TRUE 
   Loaded PROJ.4 runtime: Rel. 4.9.3, 15 August 2016, [PJ_VERSION: 493]
   Path to PROJ.4 shared files: D:/temp/RtmpU3KHBv/RLIBS_143983e5122e6/rgdal/proj
   Linking to sp version: 1.3-1 
  
  Attaching package: 'raster'
  
  The following object is masked from 'package:data.table':
  
      shift
  
  trying URL 'https://biogeo.ucdavis.edu/data/gadm3.6/shp/gadm36_STP_shp.zip'
  -- 1. Error: admLevel lookups work (@test-admlevels.R#10)  ---------------------
  cannot open URL 'https://biogeo.ucdavis.edu/data/gadm3.6/shp/gadm36_STP_shp.zip'
  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, arg = "object")
  3: eval_bare(get_expr(quo), get_env(quo))
  4: Rnightlights:::getCtryPolyAdmLevelNames("STP")
  5: getCtryShpLowestLyrNames(ctryCodes = ctryCode, gadmVersion = gadmVersion, gadmPolyType = gadmPolyType, 
         custPolyPath = custPolyPath)
  6: dnldCtryPoly(ctryCode = ctryCodes, gadmVersion = gadmVersion, gadmPolyType = gadmPolyType, 
         custPolyPath = custPolyPath)
  7: dnldGADMCtryShpZip(ctryCode = ctryCode, gadmVersion = gadmVersion, gadmPolyType = gadmPolyType, 
         downloadMethod = downloadMethod, custPolyPath = custPolyPath)
  8: utils::download.file(url = fullPolyUrl, destfile = getPolyFnameZip(ctryCode = ctryCode, 
         gadmVersion = gadmVersion, gadmPolyType = gadmPolyType, custPolyPath = custPolyPath), 
         method = "auto", mode = "wb", extra = "-c")
  
  trying URL 'https://www.ngdc.noaa.gov/eog/dmsp/downloadV4composites.html'
  Content type 'text/html; charset=UTF-8' length unknown
  .......... .......... 
  downloaded 20 KB
  
  trying URL 'https://ngdc.noaa.gov/eog/viirs/download_ut_mos_tile_iframe.html'
  Content type 'text/html; charset=UTF-8' length unknown
  .......... .......... .......... .......... ..........
  .......... .......... .......... .......... ..........
  .......... .......... .......... .......... ..........
  .......... .......... .......... .......... ..........
  .......... .......... .....
  downloaded 225 KB
  
  trying URL 'https://eogdata.mines.edu/download_dnb_composites_iframe.html'
  Content type 'text/html; charset=UTF-8' length 234051 bytes (228 KB)
  ==================================================
  downloaded 228 KB
  
  trying URL 'https://eogdata.mines.edu/download_dnb_composites_iframe.html'
  Content type 'text/html; charset=UTF-8' length 234051 bytes (228 KB)
  ==================================================
  downloaded 228 KB
  
  == testthat results  ===========================================================
  [ OK: 62 | SKIPPED: 1 | WARNINGS: 1 | FAILED: 1 ]
  1. Error: admLevel lookups work (@test-admlevels.R#10) 
  
  Error: testthat unit tests failed
  Execution halted