R Under development (unstable) (2024-07-28 r86931 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > # This file is part of the standard setup for testthat. > # It is recommended that you do not modify it. > # > # Where should you do additional test configuration? > # Learn more about the roles of various files in: > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview > # * https://testthat.r-lib.org/articles/special-files.html > > library(testthat) > library(ILORA) Warning message: replacing previous import 'ggplot2::last_plot' by 'plotly::last_plot' when loading 'ILORA' > > test_check("ILORA") [ FAIL 13 | WARN 0 | SKIP 1 | PASS 9 ] ══ Skipped tests (1) ═══════════════════════════════════════════════════════════ • On CRAN (1): 'test-get_data.R:97:3' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-get_data.R:26:3'): get_data returns a data frame for valid inputs ── Error: connection to server at "localhost" (::1), port 5432 failed: Connection refused (0x0000274D/10061) Is the server running on that host and accepting TCP/IP connections? connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused (0x0000274D/10061) Is the server running on that host and accepting TCP/IP connections? Backtrace: ▆ 1. └─ILORA::get_data(...) at test-get_data.R:26:3 2. ├─DBI::dbConnect(...) 3. └─RPostgres::dbConnect(...) 4. └─RPostgres (local) .local(drv, ...) 5. └─RPostgres:::connection_create(names(opts), as.vector(opts), check_interrupts) ── Error ('test-get_data.R:33:3'): get_data returns NULL for invalid species ─── Error: connection to server at "localhost" (::1), port 5432 failed: Connection refused (0x0000274D/10061) Is the server running on that host and accepting TCP/IP connections? connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused (0x0000274D/10061) Is the server running on that host and accepting TCP/IP connections? Backtrace: ▆ 1. └─ILORA::get_data(...) at test-get_data.R:33:3 2. ├─DBI::dbConnect(...) 3. └─RPostgres::dbConnect(...) 4. └─RPostgres (local) .local(drv, ...) 5. └─RPostgres:::connection_create(names(opts), as.vector(opts), check_interrupts) ── Error ('test-get_data.R:49:3'): get_species_details retrieves correct details for a single species ── Error: connection to server at "localhost" (::1), port 5432 failed: Connection refused (0x0000274D/10061) Is the server running on that host and accepting TCP/IP connections? connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused (0x0000274D/10061) Is the server running on that host and accepting TCP/IP connections? Backtrace: ▆ 1. └─ILORA::get_species_details(species_name) at test-get_data.R:49:3 2. ├─DBI::dbConnect(...) 3. └─RPostgres::dbConnect(...) 4. └─RPostgres (local) .local(drv, ...) 5. └─RPostgres:::connection_create(names(opts), as.vector(opts), check_interrupts) ── Error ('test-get_data.R:69:3'): get_species_details retrieves correct details for multiple species ── Error: connection to server at "localhost" (::1), port 5432 failed: Connection refused (0x0000274D/10061) Is the server running on that host and accepting TCP/IP connections? connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused (0x0000274D/10061) Is the server running on that host and accepting TCP/IP connections? Backtrace: ▆ 1. └─ILORA::get_species_details(species_names) at test-get_data.R:69:3 2. ├─DBI::dbConnect(...) 3. └─RPostgres::dbConnect(...) 4. └─RPostgres (local) .local(drv, ...) 5. └─RPostgres:::connection_create(names(opts), as.vector(opts), check_interrupts) ── Error ('test-get_data.R:91:3'): get_species_details handles invalid input types ── Error: connection to server at "localhost" (::1), port 5432 failed: Connection refused (0x0000274D/10061) Is the server running on that host and accepting TCP/IP connections? connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused (0x0000274D/10061) Is the server running on that host and accepting TCP/IP connections? Backtrace: ▆ 1. ├─testthat::expect_error(get_species_details(123), "species_name should be character or list of characters") at test-get_data.R:91:3 2. │ └─testthat:::expect_condition_matching(...) 3. │ └─testthat:::quasi_capture(...) 4. │ ├─testthat (local) .capture(...) 5. │ │ └─base::withCallingHandlers(...) 6. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 7. └─ILORA::get_species_details(123) 8. ├─DBI::dbConnect(...) 9. └─RPostgres::dbConnect(...) 10. └─RPostgres (local) .local(drv, ...) 11. └─RPostgres:::connection_create(names(opts), as.vector(opts), check_interrupts) ── Error ('test-get_data.R:115:3'): plot_species_on_map creates a plot for given species ── Error: connection to server at "localhost" (::1), port 5432 failed: Connection refused (0x0000274D/10061) Is the server running on that host and accepting TCP/IP connections? connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused (0x0000274D/10061) Is the server running on that host and accepting TCP/IP connections? Backtrace: ▆ 1. └─ILORA::plot_species_on_map(species_names) at test-get_data.R:115:3 2. └─ILORA::get_data(species_names, c("longitude", "latitude")) 3. ├─DBI::dbConnect(...) 4. └─RPostgres::dbConnect(...) 5. └─RPostgres (local) .local(drv, ...) 6. └─RPostgres:::connection_create(names(opts), as.vector(opts), check_interrupts) ── Error ('test-get_data.R:123:3'): plot_species_on_map handles custom colors ── Error: connection to server at "localhost" (::1), port 5432 failed: Connection refused (0x0000274D/10061) Is the server running on that host and accepting TCP/IP connections? connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused (0x0000274D/10061) Is the server running on that host and accepting TCP/IP connections? Backtrace: ▆ 1. └─ILORA::plot_species_on_map(species_names, custom_colors = custom_colors) at test-get_data.R:123:3 2. └─ILORA::get_data(species_names, c("longitude", "latitude")) 3. ├─DBI::dbConnect(...) 4. └─RPostgres::dbConnect(...) 5. └─RPostgres (local) .local(drv, ...) 6. └─RPostgres:::connection_create(names(opts), as.vector(opts), check_interrupts) ── Error ('test-get_data.R:130:3'): plot_species_on_map returns error for invalid custom colors input ── Error: connection to server at "localhost" (::1), port 5432 failed: Connection refused (0x0000274D/10061) Is the server running on that host and accepting TCP/IP connections? connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused (0x0000274D/10061) Is the server running on that host and accepting TCP/IP connections? Backtrace: ▆ 1. ├─testthat::expect_error(...) at test-get_data.R:130:3 2. │ └─testthat:::expect_condition_matching(...) 3. │ └─testthat:::quasi_capture(...) 4. │ ├─testthat (local) .capture(...) 5. │ │ └─base::withCallingHandlers(...) 6. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 7. └─ILORA::plot_species_on_map(species_names, custom_colors = custom_colors) 8. └─ILORA::get_data(species_names, c("longitude", "latitude")) 9. ├─DBI::dbConnect(...) 10. └─RPostgres::dbConnect(...) 11. └─RPostgres (local) .local(drv, ...) 12. └─RPostgres:::connection_create(names(opts), as.vector(opts), check_interrupts) ── Error ('test-get_data.R:136:3'): bar_plot creates a plot ──────────────────── Error: connection to server at "localhost" (::1), port 5432 failed: Connection refused (0x0000274D/10061) Is the server running on that host and accepting TCP/IP connections? connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused (0x0000274D/10061) Is the server running on that host and accepting TCP/IP connections? Backtrace: ▆ 1. └─ILORA::bar_plot() at test-get_data.R:136:3 2. ├─DBI::dbConnect(...) 3. └─RPostgres::dbConnect(...) 4. └─RPostgres (local) .local(drv, ...) 5. └─RPostgres:::connection_create(names(opts), as.vector(opts), check_interrupts) ── Error ('test-get_data.R:142:3'): bar_plot has correct title and labels ────── Error: connection to server at "localhost" (::1), port 5432 failed: Connection refused (0x0000274D/10061) Is the server running on that host and accepting TCP/IP connections? connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused (0x0000274D/10061) Is the server running on that host and accepting TCP/IP connections? Backtrace: ▆ 1. └─ILORA::bar_plot() at test-get_data.R:142:3 2. ├─DBI::dbConnect(...) 3. └─RPostgres::dbConnect(...) 4. └─RPostgres (local) .local(drv, ...) 5. └─RPostgres:::connection_create(names(opts), as.vector(opts), check_interrupts) ── Error ('test-get_data.R:150:3'): species_count_plot creates ggplot objects ── Error: connection to server at "localhost" (::1), port 5432 failed: Connection refused (0x0000274D/10061) Is the server running on that host and accepting TCP/IP connections? connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused (0x0000274D/10061) Is the server running on that host and accepting TCP/IP connections? Backtrace: ▆ 1. └─ILORA::species_count_plot() at test-get_data.R:150:3 2. ├─DBI::dbConnect(...) 3. └─RPostgres::dbConnect(...) 4. └─RPostgres (local) .local(drv, ...) 5. └─RPostgres:::connection_create(names(opts), as.vector(opts), check_interrupts) ── Error ('test-get_data.R:157:3'): species_count_plot has correct titles and labels ── Error: connection to server at "localhost" (::1), port 5432 failed: Connection refused (0x0000274D/10061) Is the server running on that host and accepting TCP/IP connections? connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused (0x0000274D/10061) Is the server running on that host and accepting TCP/IP connections? Backtrace: ▆ 1. └─ILORA::species_count_plot() at test-get_data.R:157:3 2. ├─DBI::dbConnect(...) 3. └─RPostgres::dbConnect(...) 4. └─RPostgres (local) .local(drv, ...) 5. └─RPostgres:::connection_create(names(opts), as.vector(opts), check_interrupts) ── Error ('test-get_data.R:173:3'): introduction_pathways_plot creates a Plotly pie chart ── Error: connection to server at "localhost" (::1), port 5432 failed: Connection refused (0x0000274D/10061) Is the server running on that host and accepting TCP/IP connections? connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused (0x0000274D/10061) Is the server running on that host and accepting TCP/IP connections? Backtrace: ▆ 1. └─ILORA::introduction_pathways_plot() at test-get_data.R:173:3 2. ├─DBI::dbConnect(...) 3. └─RPostgres::dbConnect(...) 4. └─RPostgres (local) .local(drv, ...) 5. └─RPostgres:::connection_create(names(opts), as.vector(opts), check_interrupts) [ FAIL 13 | WARN 0 | SKIP 1 | PASS 9 ] Error: Test failures Execution halted