Running ‘testthat.R’ [2s/4s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(postGIStools)
  Loading required package: sp
  > 
  > test_check("postGIStools")
  Error in postgresqlExecStatement(conn, statement, ...) : 
    RS-DBI driver: (could not Retrieve the result : ERROR:  relation "country" does not exist
  LINE 1: ...ECT * FROM (select name, capital, population from country wh...
                                                               ^
  )
  ── 1. Failure: get_postgis_query works for simple queries (@test_get_query.R#20)
  `qry` not equal to `resp`.
  target is NULL, current is data.frame
  
  Error in postgresqlExecStatement(conn, statement, ...) : 
    RS-DBI driver: (could not Retrieve the result : ERROR:  relation "country" does not exist
  LINE 1: ...ations_json" FROM (SELECT name, translations FROM country WH...
                                                               ^
  )
  ── 2. Error: get_postgis_query correctly imports hstore (@test_get_query.R#26)  
  incorrect number of subscripts on matrix
  1: get_postgis_query(con, "SELECT name, translations FROM country WHERE iso2 = 'BR'", 
         hstore_name = "translations") at testthat/test_get_query.R:26
  2: process_select_result(res, geom_name, hstore_name)
  
  Error in postgresqlExecStatement(conn, statement, ...) : 
    RS-DBI driver: (could not Retrieve the result : ERROR:  relation "country" does not exist
  LINE 1: ...eom") AS "geom_srid" FROM (SELECT name, geom FROM country WH...
                                                               ^
  )
  ── 3. Error: get_postgis_query correctly imports geometry (@test_get_query.R#39)
  WKT must have length 1
  1: get_postgis_query(con, "SELECT name, geom FROM country WHERE iso2 IN ('KE', 'TZ')", 
         geom_name = "geom") at testthat/test_get_query.R:39
  2: process_select_result(res, geom_name, hstore_name)
  3: rgeos::readWKT(text = res[1, geom_wkt])
  4: stop("WKT must have length 1")
  
  Error in postgresqlExecStatement(conn, statement, ...) : 
    RS-DBI driver: (could not Retrieve the result : ERROR:  relation "country" does not exist
  LINE 1: ...ions") AS "translations_json" FROM (SELECT * FROM country WH...
                                                               ^
  )
  ── 4. Error: get_postgis_query works with SELECT * (wildcard) (@test_get_query.R
  incorrect number of subscripts on matrix
  1: get_postgis_query(con, "SELECT * FROM country WHERE iso2 IN ('KE', 'TZ')", geom_name = "geom", 
         hstore_name = "translations") at testthat/test_get_query.R:58
  2: process_select_result(res, geom_name, hstore_name)
  
  Error in postgresqlExecStatement(conn, statement, ...) : 
    RS-DBI driver: (could not Retrieve the result : ERROR:  relation "country" does not exist
  LINE 1: ...r_srid" FROM (SELECT ST_Centroid(geom) centr FROM country WH...
                                                               ^
  )
  ── 5. Error: get_postgis_query correctly imports points from ST_Centroid (@test_
  WKT must have length 1
  1: get_postgis_query(con, "SELECT ST_Centroid(geom) centr FROM country WHERE iso2 IN ('KE', 'TZ')", 
         geom_name = "centr") at testthat/test_get_query.R:72
  2: process_select_result(res, geom_name, hstore_name)
  3: rgeos::readWKT(text = res[1, geom_wkt])
  4: stop("WKT must have length 1")
  
  Error in postgresqlExecStatement(conn, statement, ...) : 
    RS-DBI driver: (could not Retrieve the result : ERROR:  relation "country" does not exist
  LINE 1: ...d_srid" FROM (SELECT ST_Boundary(geom) bound FROM country WH...
                                                               ^
  )
  ── 6. Error: get_postgis_query correctly imports lines from ST_Boundary (@test_g
  WKT must have length 1
  1: get_postgis_query(con, "SELECT ST_Boundary(geom) bound FROM country WHERE iso2 IN ('KE', 'TZ')", 
         geom_name = "bound") at testthat/test_get_query.R:83
  2: process_select_result(res, geom_name, hstore_name)
  3: rgeos::readWKT(text = res[1, geom_wkt])
  4: stop("WKT must have length 1")
  
  ── 7. Error: (unknown) (@test_insert_update.R#16)  ─────────────────────────────
  RS-DBI driver: (could not Retrieve the result : ERROR:  type "geometry" does not exist
  LINE 2:                                         geom geometry)
                                                       ^
  )
  1: RPostgreSQL::dbSendQuery(con, paste("CREATE TEMP TABLE cty_tmp (name text,", "iso2 text PRIMARY KEY, capital text,", 
         "population integer, translations hstore,\n                                        geom geometry)")) at testthat/test_insert_update.R:16
  2: RPostgreSQL::dbSendQuery(con, paste("CREATE TEMP TABLE cty_tmp (name text,", "iso2 text PRIMARY KEY, capital text,", 
         "population integer, translations hstore,\n                                        geom geometry)"))
  3: postgresqlExecStatement(conn, statement, ...)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 16 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 7 ]
  1. Failure: get_postgis_query works for simple queries (@test_get_query.R#20) 
  2. Error: get_postgis_query correctly imports hstore (@test_get_query.R#26) 
  3. Error: get_postgis_query correctly imports geometry (@test_get_query.R#39) 
  4. Error: get_postgis_query works with SELECT * (wildcard) (@test_get_query.R#58) 
  5. Error: get_postgis_query correctly imports points from ST_Centroid (@test_get_query.R#72) 
  6. Error: get_postgis_query correctly imports lines from ST_Boundary (@test_get_query.R#83) 
  7. Error: (unknown) (@test_insert_update.R#16) 
  
  Error: testthat unit tests failed
  Execution halted