Running ‘testthat.R’ [27s/83s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(hyd1d)
  'df.gauging_data' locally stored at
  /tmp/Rtmph5qqSN/df.gauging_data_latest.RDS
  was last downloaded 2023-02-01 05:49:37 CET
  > 
  > test_check("hyd1d")
  [ FAIL 4 | WARN 6 | SKIP 0 | PASS 117 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test_getW.R:47'): getPegelonlineW ───────────────────────────────────
  <subscriptOutOfBoundsError/error/condition>
  Error in `w_list[[i]]`: subscript out of bounds
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(...) at test_getW.R:47:4
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─hyd1d::getPegelonlineW(gauging_station = "DESSAU", time = times)
   5.   └─base::strptime(w_list[[i]]$timestamp, format = "%Y-%m-%dT%H:%M:%S")
  ── Error ('test_waterLevelPegelonline.R:9'): waterLevelPegelonline: Dessau ─────
  Error in ``$<-.data.frame`(`*tmp*`, "n_wls_below_w_up", value = 0L)`: replacement has 1 row, data has 0
  Backtrace:
      ▆
   1. └─hyd1d::waterLevelPegelonline(wldf, shiny = TRUE) at test_waterLevelPegelonline.R:9:4
   2.   ├─base::`$<-`(`*tmp*`, "n_wls_below_w_up", value = `<int>`)
   3.   └─base::`$<-.data.frame`(`*tmp*`, "n_wls_below_w_up", value = `<int>`)
  ── Error ('test_waterLevelPegelonline.R:28'): waterLevelPegelonline: Schöna ────
  Error in ``$<-.data.frame`(`*tmp*`, "n_wls_below_w_do", value = c(NA, 0L
  ))`: replacement has 2 rows, data has 1
  Backtrace:
      ▆
   1. └─hyd1d::waterLevelPegelonline(wldf, shiny = TRUE) at test_waterLevelPegelonline.R:28:4
   2.   ├─base::`$<-`(`*tmp*`, "n_wls_below_w_do", value = `<int>`)
   3.   └─base::`$<-.data.frame`(`*tmp*`, "n_wls_below_w_do", value = `<int>`)
  ── Error ('test_waterLevelPegelonline.R:41'): waterLevelPegelonline: Geesthacht ──
  Error in ``$<-.data.frame`(`*tmp*`, "n_wls_below_w_do", value = c(NA, 0L
  ))`: replacement has 2 rows, data has 1
  Backtrace:
      ▆
   1. └─hyd1d::waterLevelPegelonline(wldf, shiny = TRUE) at test_waterLevelPegelonline.R:41:4
   2.   ├─base::`$<-`(`*tmp*`, "n_wls_below_w_do", value = `<int>`)
   3.   └─base::`$<-.data.frame`(`*tmp*`, "n_wls_below_w_do", value = `<int>`)
  
  [ FAIL 4 | WARN 6 | SKIP 0 | PASS 117 ]
  Error: Test failures
  Execution halted