Running ‘testthat.R’ [13s/24s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(Rnightlights)
  2019-10-01 03:37:55: Creating data folder in temporary location /tmp/RtmpBfi4t7/.Rnightlights
  2019-10-01 03:37:55: Data directory created /tmp/RtmpBfi4t7/.Rnightlights
  2019-10-01 03:37:55: 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-01 03:37:56: The directories are the same. Not changing
  > 
  > test_check("Rnightlights")
  Loading required package: sp
  rgdal: version: 1.4-4, (SVN revision 833)
   Geospatial Data Abstraction Library extensions to R successfully loaded
   Loaded GDAL runtime: GDAL 2.4.2, released 2019/06/28
   Path to GDAL shared files: /usr/share/gdal
   GDAL binary built with GEOS: TRUE 
   Loaded PROJ.4 runtime: Rel. 6.2.0, September 1st, 2019, [PJ_VERSION: 620]
   Path to PROJ.4 shared files: (autodetected)
   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'
  Content type 'application/zip' length 99696 bytes (97 KB)
  ==================================================
  downloaded 97 KB
  
  OGR data source with driver: ESRI Shapefile 
  Source: "/tmp/RtmpBfi4t7/.Rnightlights/polygons/POLY_STP_GADM-3.6-SHPZIP", layer: "gadm36_STP_0"
  with 1 features
  It has 2 fields
  OGR data source with driver: ESRI Shapefile 
  Source: "/tmp/RtmpBfi4t7/.Rnightlights/polygons/POLY_STP_GADM-3.6-SHPZIP", layer: "gadm36_STP_1"
  with 2 features
  It has 10 fields
  OGR data source with driver: ESRI Shapefile 
  Source: "/tmp/RtmpBfi4t7/.Rnightlights/polygons/POLY_STP_GADM-3.6-SHPZIP", layer: "gadm36_STP_2"
  with 7 features
  It has 13 fields
  OGR data source with driver: ESRI Shapefile 
  Source: "/tmp/RtmpBfi4t7/.Rnightlights/polygons/POLY_STP_GADM-3.6-SHPZIP", layer: "gadm36_STP_0"
  with 1 features
  It has 3 fields
  OGR data source with driver: ESRI Shapefile 
  Source: "/tmp/RtmpBfi4t7/.Rnightlights/polygons/POLY_STP_GADM-3.6-SHPZIP", layer: "gadm36_STP_1"
  with 2 features
  It has 11 fields
  OGR data source with driver: ESRI Shapefile 
  Source: "/tmp/RtmpBfi4t7/.Rnightlights/polygons/POLY_STP_GADM-3.6-SHPZIP", layer: "gadm36_STP_2"
  with 7 features
  It has 14 fields
  trying URL 'https://www.ngdc.noaa.gov/eog/dmsp/downloadV4composites.html'
  downloaded 20 KB
  
  trying URL 'https://ngdc.noaa.gov/eog/viirs/download_ut_mos_tile_iframe.html'
  downloaded 193 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
  
  ── 1. Failure: nlUrls work (@test-nlurl.R#17)  ─────────────────────────────────
  `nlUrlVIIRS.D_CurrMonth1st` not equal to paste0(...).
  target is NULL, current is character
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 72 | SKIPPED: 1 | WARNINGS: 0 | FAILED: 1 ]
  1. Failure: nlUrls work (@test-nlurl.R#17) 
  
  Error: testthat unit tests failed
  Execution halted