R Under development (unstable) (2024-10-17 r87242 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/tests.html > # * https://testthat.r-lib.org/reference/test_package.html#special-files > > library(testthat) > library(GitStats) > > test_check("GitStats") ..... [ FAIL 35 | WARN 0 | SKIP 54 | PASS 460 ] ══ Skipped tests (54) ══════════════════════════════════════════════════════════ • On CRAN (51): 'test-01-get_repos-GitHub.R:4:3', 'test-01-get_repos-GitHub.R:229:3', 'test-01-get_repos-GitHub.R:241:3', 'test-01-get_repos-GitHub.R:402:3', 'test-01-get_repos-GitHub.R:472:3', 'test-01-get_repos-GitLab.R:4:3', 'test-01-get_repos-GitLab.R:192:3', 'test-01-get_repos-GitStats.R:75:3', 'test-get_commits-GitHub.R:9:3', 'test-get_commits-GitLab.R:64:3', 'test-get_files_content-GitHub.R:4:3', 'test-get_files_content-GitLab.R:4:3', 'test-get_files_content-GitLab.R:114:3', 'test-get_files_structure-GitHub.R:4:3', 'test-get_files_structure-GitHub.R:204:3', 'test-get_files_structure-GitHub.R:256:3', 'test-get_files_structure-GitLab.R:4:3', 'test-get_files_structure-GitLab.R:177:3', 'test-get_files_structure-GitLab.R:238:3', 'test-get_files_structure-GitStats.R:25:3', 'test-get_files_structure-GitStats.R:40:3', 'test-get_release-GitHub.R:4:3', 'test-get_release-GitLab.R:4:3', 'test-get_usage_R_package.R:98:3', 'test-get_user-GitHub.R:4:3', 'test-get_user-GitLab.R:4:3', 'test-helpers.R:2:3', 'test-helpers.R:38:3', 'test-helpers.R:46:3', 'test-helpers.R:52:3', 'test-helpers.R:70:3', 'test-helpers.R:90:3', 'test-helpers.R:114:3', 'test-helpers.R:145:3', 'test-helpers.R:155:3', 'test-helpers.R:173:3', 'test-set_host.R:4:3', 'test-set_host.R:21:3', 'test-set_host.R:31:3', 'test-set_host.R:43:3', 'test-set_host.R:59:3', 'test-set_host.R:75:3', 'test-set_host.R:92:3', 'test-set_host.R:107:3', 'test-set_host.R:128:3', 'test-set_host.R:145:3', 'test-z-GitStats.R:8:3', 'test-z-GitStats.R:13:3', 'test-z-GitStats.R:34:3', 'test-z-GitStats.R:40:3', 'test-z-GitStats.R:88:3' • Sys.getenv("GITHUB_PAT") == "" is TRUE (3): 'test-00-api-requests.R:29:3', 'test-00-api-requests.R:41:3', 'test-00-api-requests.R:53:3' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-01-get_repos-GitHub.R:261:3'): `get_repos_issues()` adds issues to repos table ── Error in `if (nrow(repos_table) > 0) { repos_iterator <- paste0(repos_table$organization, "/", repos_table$repo_name) issues <- purrr::map_dfr(repos_iterator, function(repo_path) { issues_endpoint <- paste0(private$endpoints[["repositories"]], repo_path, "/issues") issues <- self$response(endpoint = issues_endpoint) data.frame(open = length(purrr::keep(issues, ~.$state == "open")), closed = length(purrr::keep(issues, ~.$state == "closed"))) }, .progress = if (progress) { "Pulling repositories issues..." } else { FALSE }) repos_table$issues_open <- issues$open repos_table$issues_closed <- issues$closed }`: argument is of length zero Backtrace: ▆ 1. ├─base::suppressMessages(...) at test-01-get_repos-GitHub.R:261:3 2. │ └─base::withCallingHandlers(...) 3. └─test_rest_github$get_repos_issues(gh_repos_by_code_table, progress = FALSE) ── Failure ('test-01-get_repos-GitHub.R:294:3'): `get_repos_with_code_from_orgs()` works ── Names of `repos_object` ('') don't match 'repo_id', 'repo_name', 'default_branch', 'stars', 'forks', 'created_at', 'last_activity_at', 'languages', 'issues_open', 'issues_closed', 'organization', 'repo_url' Backtrace: ▆ 1. └─GitStats:::expect_repos_table(repos_with_code_from_orgs_full) at test-01-get_repos-GitHub.R:294:3 2. └─testthat::expect_named(repos_object, repo_cols) at D:\RCompile\CRANincoming\R-devel\GitStats.Rcheck\tests\testthat\helper-expect-tables.R:35:3 ── Failure ('test-01-get_repos-GitHub.R:294:3'): `get_repos_with_code_from_orgs()` works ── nrow(repos_object) is not strictly more than 0. Difference: 0 Backtrace: ▆ 1. └─GitStats:::expect_repos_table(repos_with_code_from_orgs_full) at test-01-get_repos-GitHub.R:294:3 2. └─testthat::expect_gt(nrow(repos_object), 0) at D:\RCompile\CRANincoming\R-devel\GitStats.Rcheck\tests\testthat\helper-expect-tables.R:36:3 ── Failure ('test-01-get_repos-GitHub.R:314:3'): `get_repos_with_code_from_orgs()` pulls minimum version of table ── Names of `repos_object` ('') don't match 'repo_id', 'repo_name', 'default_branch', 'created_at', 'organization', 'repo_url' Backtrace: ▆ 1. └─GitStats:::expect_repos_table(...) at test-01-get_repos-GitHub.R:314:3 2. └─testthat::expect_named(repos_object, repo_cols) at D:\RCompile\CRANincoming\R-devel\GitStats.Rcheck\tests\testthat\helper-expect-tables.R:35:3 ── Failure ('test-01-get_repos-GitHub.R:314:3'): `get_repos_with_code_from_orgs()` pulls minimum version of table ── nrow(repos_object) is not strictly more than 0. Difference: 0 Backtrace: ▆ 1. └─GitStats:::expect_repos_table(...) at test-01-get_repos-GitHub.R:314:3 2. └─testthat::expect_gt(nrow(repos_object), 0) at D:\RCompile\CRANincoming\R-devel\GitStats.Rcheck\tests\testthat\helper-expect-tables.R:36:3 ── Failure ('test-01-get_repos-GitHub.R:362:3'): get_repos_with_code() works ─── Names of `repos_object` ('') don't match 'repo_id', 'repo_name', 'default_branch', 'stars', 'forks', 'created_at', 'last_activity_at', 'languages', 'issues_open', 'issues_closed', 'organization', 'repo_url' Backtrace: ▆ 1. └─GitStats:::expect_repos_table(github_repos_with_code) at test-01-get_repos-GitHub.R:362:3 2. └─testthat::expect_named(repos_object, repo_cols) at D:\RCompile\CRANincoming\R-devel\GitStats.Rcheck\tests\testthat\helper-expect-tables.R:35:3 ── Failure ('test-01-get_repos-GitHub.R:362:3'): get_repos_with_code() works ─── nrow(repos_object) is not strictly more than 0. Difference: 0 Backtrace: ▆ 1. └─GitStats:::expect_repos_table(github_repos_with_code) at test-01-get_repos-GitHub.R:362:3 2. └─testthat::expect_gt(nrow(repos_object), 0) at D:\RCompile\CRANincoming\R-devel\GitStats.Rcheck\tests\testthat\helper-expect-tables.R:36:3 ── Failure ('test-01-get_repos-GitHub.R:379:3'): get_repos_with_code() works ─── Names of `repos_object` ('') don't match 'repo_id', 'repo_name', 'default_branch', 'created_at', 'organization', 'repo_url' Backtrace: ▆ 1. └─GitStats:::expect_repos_table(github_repos_with_code_min, repo_cols = repo_min_colnames) at test-01-get_repos-GitHub.R:379:3 2. └─testthat::expect_named(repos_object, repo_cols) at D:\RCompile\CRANincoming\R-devel\GitStats.Rcheck\tests\testthat\helper-expect-tables.R:35:3 ── Failure ('test-01-get_repos-GitHub.R:379:3'): get_repos_with_code() works ─── nrow(repos_object) is not strictly more than 0. Difference: 0 Backtrace: ▆ 1. └─GitStats:::expect_repos_table(github_repos_with_code_min, repo_cols = repo_min_colnames) at test-01-get_repos-GitHub.R:379:3 2. └─testthat::expect_gt(nrow(repos_object), 0) at D:\RCompile\CRANincoming\R-devel\GitStats.Rcheck\tests\testthat\helper-expect-tables.R:36:3 ── Failure ('test-01-get_repos-GitHub.R:541:3'): `get_repos()` pulls table in minimalist version ── `repos_object` is not an S3 object Backtrace: ▆ 1. └─GitStats:::expect_repos_table(...) at test-01-get_repos-GitHub.R:541:3 2. └─testthat::expect_s3_class(repos_object, "data.frame") at D:\RCompile\CRANincoming\R-devel\GitStats.Rcheck\tests\testthat\helper-expect-tables.R:34:3 ── Failure ('test-01-get_repos-GitHub.R:541:3'): `get_repos()` pulls table in minimalist version ── Names of `repos_object` ('') don't match 'repo_id', 'repo_name', 'default_branch', 'created_at', 'organization', 'repo_url', 'api_url', 'platform' Backtrace: ▆ 1. └─GitStats:::expect_repos_table(...) at test-01-get_repos-GitHub.R:541:3 2. └─testthat::expect_named(repos_object, repo_cols) at D:\RCompile\CRANincoming\R-devel\GitStats.Rcheck\tests\testthat\helper-expect-tables.R:35:3 ── Error ('test-01-get_repos-GitHub.R:541:3'): `get_repos()` pulls table in minimalist version ── Error in `expect_compare(">", act, exp)`: Result of comparison must be a single logical value Backtrace: ▆ 1. └─GitStats:::expect_repos_table(...) at test-01-get_repos-GitHub.R:541:3 2. └─testthat::expect_gt(nrow(repos_object), 0) at D:\RCompile\CRANincoming\R-devel\GitStats.Rcheck\tests\testthat\helper-expect-tables.R:36:3 3. └─testthat:::expect_compare(">", act, exp) 4. └─rlang::abort("Result of comparison must be a single logical value") ── Error ('test-01-get_repos-GitLab.R:211:3'): `get_repos_issues()` adds issues to repos table ── Error in `if (nrow(repos_table) > 0) { issues <- purrr::map(repos_table$repo_id, function(repos_id) { id <- gsub("gid://gitlab/Project/", "", repos_id) issues_endpoint <- paste0(self$rest_api_url, "/projects/", id, "/issues_statistics") self$response(endpoint = issues_endpoint)[["statistics"]][["counts"]] }, .progress = if (progress) { "Pulling repositories issues..." } else { FALSE }) repos_table$issues_open <- purrr::map_dbl(issues, ~.$opened) repos_table$issues_closed <- purrr::map_dbl(issues, ~.$closed) }`: argument is of length zero Backtrace: ▆ 1. └─test_rest_gitlab$get_repos_issues(gl_repos_by_code_table, progress = FALSE) at test-01-get_repos-GitLab.R:211:3 ── Failure ('test-01-get_repos-GitStats.R:41:3'): get_repos_from_hosts pulls table in minimalist version ── Names of `repos_object` ('') don't match 'repo_id', 'repo_name', 'default_branch', 'created_at', 'organization', 'repo_url', 'api_url', 'platform' Backtrace: ▆ 1. └─GitStats:::expect_repos_table(...) at test-01-get_repos-GitStats.R:41:3 2. └─testthat::expect_named(repos_object, repo_cols) at D:\RCompile\CRANincoming\R-devel\GitStats.Rcheck\tests\testthat\helper-expect-tables.R:35:3 ── Failure ('test-01-get_repos-GitStats.R:41:3'): get_repos_from_hosts pulls table in minimalist version ── nrow(repos_object) is not strictly more than 0. Difference: 0 Backtrace: ▆ 1. └─GitStats:::expect_repos_table(...) at test-01-get_repos-GitStats.R:41:3 2. └─testthat::expect_gt(nrow(repos_object), 0) at D:\RCompile\CRANincoming\R-devel\GitStats.Rcheck\tests\testthat\helper-expect-tables.R:36:3 ── Failure ('test-get_commits-GitLab.R:91:3'): get_commits_from_orgs works ───── Names of `get_commits_object` ('id', 'committed_date', 'author', 'additions', 'deletions', 'repository', 'organization', 'api_url') don't match 'id', 'committed_date', 'author', 'author_login', 'author_name', 'additions', 'deletions', 'repository', 'organization', 'api_url' Backtrace: ▆ 1. └─GitStats:::expect_commits_table(gl_commits_table) at test-get_commits-GitLab.R:91:3 2. └─testthat::expect_named(get_commits_object, commit_cols) at D:\RCompile\CRANincoming\R-devel\GitStats.Rcheck\tests\testthat\helper-expect-tables.R:52:3 ── Failure ('test-get_commits-GitLab.R:108:3'): get_commits for GitLab works with repos implied ── Names of `get_commits_object` ('id', 'committed_date', 'author', 'additions', 'deletions', 'repository', 'organization', 'api_url') don't match 'id', 'committed_date', 'author', 'author_login', 'author_name', 'additions', 'deletions', 'repository', 'organization', 'api_url' Backtrace: ▆ 1. └─GitStats:::expect_commits_table(gl_commits_table) at test-get_commits-GitLab.R:108:3 2. └─testthat::expect_named(get_commits_object, commit_cols) at D:\RCompile\CRANincoming\R-devel\GitStats.Rcheck\tests\testthat\helper-expect-tables.R:52:3 ── Failure ('test-get_files_content-GitLab.R:139:3'): checker properly identifies gitlab files responses ── test_graphql_gitlab_priv$response_prepared_by_iteration(files_response = test_mocker$use("gitlab_files_response_by_repos")) is not TRUE `actual`: FALSE `expected`: TRUE ── Failure ('test-get_files_content-GitLab.R:162:3'): GitLab prepares table from files response prepared in alternative way ── `files_object` is not an S3 object Backtrace: ▆ 1. └─GitStats:::expect_files_table(gl_files_table) at test-get_files_content-GitLab.R:162:3 2. └─testthat::expect_s3_class(files_object, "data.frame") at D:\RCompile\CRANincoming\R-devel\GitStats.Rcheck\tests\testthat\helper-expect-tables.R:76:3 ── Failure ('test-get_files_content-GitLab.R:162:3'): GitLab prepares table from files response prepared in alternative way ── Names of `files_object` ('') don't match 'repo_name', 'repo_id', 'organization', 'file_path', 'file_content', 'file_size', 'repo_url' Backtrace: ▆ 1. └─GitStats:::expect_files_table(gl_files_table) at test-get_files_content-GitLab.R:162:3 2. └─testthat::expect_named(...) at D:\RCompile\CRANincoming\R-devel\GitStats.Rcheck\tests\testthat\helper-expect-tables.R:77:3 ── Failure ('test-get_files_content-GitLab.R:162:3'): GitLab prepares table from files response prepared in alternative way ── files_object$file_size has type 'NULL', not 'integer'. Backtrace: ▆ 1. └─GitStats:::expect_files_table(gl_files_table) at test-get_files_content-GitLab.R:162:3 2. └─testthat::expect_type(files_object$file_size, "integer") at D:\RCompile\CRANincoming\R-devel\GitStats.Rcheck\tests\testthat\helper-expect-tables.R:83:3 ── Error ('test-get_files_content-GitLab.R:162:3'): GitLab prepares table from files response prepared in alternative way ── Error in `expect_compare(">", act, exp)`: Result of comparison must be a single logical value Backtrace: ▆ 1. └─GitStats:::expect_files_table(gl_files_table) at test-get_files_content-GitLab.R:162:3 2. └─testthat::expect_gt(nrow(files_object), 0) at D:\RCompile\CRANincoming\R-devel\GitStats.Rcheck\tests\testthat\helper-expect-tables.R:84:3 3. └─testthat:::expect_compare(">", act, exp) 4. └─rlang::abort("Result of comparison must be a single logical value") ── Failure ('test-get_files_structure-GitLab.R:206:3'): get_path_from_files_structure gets file path from files structure ── typeof(file_path) (`actual`) not equal to "character" (`expected`). `actual`: "NULL" `expected`: "character" ── Failure ('test-get_files_structure-GitLab.R:207:3'): get_path_from_files_structure gets file path from files structure ── length(file_path) > 0 is not TRUE `actual`: FALSE `expected`: TRUE ── Failure ('test-get_files_structure-GitLab.R:222:3'): get_files_structure pulls files structure for repositories in orgs ── names(gl_files_structure_from_orgs) (`actual`) not equal to c("mbtests") (`expected`). `actual` is NULL `expected` is a character vector ('mbtests') ── Failure ('test-get_usage_R_package.R:15:3'): get_R_package_as_dependency work correctly ── nrow(R_package_as_dependency) is not strictly more than 0. Difference: 0 ── Failure ('test-get_usage_R_package.R:36:3'): get_R_package_loading work correctly ── nrow(R_package_loading) is not strictly more than 0. Difference: 0 ── Failure ('test-get_usage_R_package.R:60:3'): get_R_package_usage_from_hosts works as expected ── Names of `object` ('') don't match 'package', 'package_usage', 'repo_id', 'repo_fullname', 'repo_name', 'default_branch', 'created_at', 'organization', 'repo_url', 'api_url', 'platform' Backtrace: ▆ 1. └─GitStats:::expect_package_usage_table(R_package_usage_table) at test-get_usage_R_package.R:60:3 2. └─testthat::expect_named(...) at D:\RCompile\CRANincoming\R-devel\GitStats.Rcheck\tests\testthat\helper-expect-tables.R:16:3 ── Failure ('test-get_usage_R_package.R:60:3'): get_R_package_usage_from_hosts works as expected ── nrow(object) is not strictly more than 0. Difference: 0 Backtrace: ▆ 1. └─GitStats:::expect_package_usage_table(R_package_usage_table) at test-get_usage_R_package.R:60:3 2. └─testthat::expect_gt(nrow(object), 0) at D:\RCompile\CRANincoming\R-devel\GitStats.Rcheck\tests\testthat\helper-expect-tables.R:19:3 ── Error ('test-get_usage_R_package.R:83:3'): get_R_package_usage_from_hosts with split_output works ── Error in `map(.x, .f, ..., .progress = .progress)`: i In index: 1. i With name: shiny. Caused by error: ! Names of `object` ('') don't match 'package', 'package_usage', 'repo_id', 'repo_fullname', 'repo_name', 'default_branch', 'created_at', 'organization', 'repo_url', 'api_url', 'platform' ── Failure ('test-get_usage_R_package.R:117:3'): get_R_package_usage works ───── Names of `object` ('') don't match 'package', 'package_usage', 'repo_id', 'repo_fullname', 'repo_name', 'default_branch', 'created_at', 'organization', 'repo_url', 'api_url', 'platform' Backtrace: ▆ 1. └─GitStats:::expect_package_usage_table(R_package_usage_table) at test-get_usage_R_package.R:117:3 2. └─testthat::expect_named(...) at D:\RCompile\CRANincoming\R-devel\GitStats.Rcheck\tests\testthat\helper-expect-tables.R:16:3 ── Failure ('test-get_usage_R_package.R:117:3'): get_R_package_usage works ───── nrow(object) is not strictly more than 0. Difference: 0 Backtrace: ▆ 1. └─GitStats:::expect_package_usage_table(R_package_usage_table) at test-get_usage_R_package.R:117:3 2. └─testthat::expect_gt(nrow(object), 0) at D:\RCompile\CRANincoming\R-devel\GitStats.Rcheck\tests\testthat\helper-expect-tables.R:19:3 ── Failure ('test-get_usage_R_package.R:118:3'): get_R_package_usage works ───── `R_package_usage_table` inherits from 'tbl_df'/'tbl'/'data.frame' not 'R_package_usage'. ── Error ('test-z-GitStats.R:17:3'): GitStats prints the proper info when repos are passed instead of orgs. ── Error in `private$check_token(token)`: i No token provided. Backtrace: ▆ 1. ├─base::suppressMessages(...) at test-z-GitStats.R:17:3 2. │ └─base::withCallingHandlers(...) 3. ├─... %>% ... 4. ├─GitStats::set_gitlab_host(...) 5. └─GitStats::set_github_host(...) 6. └─gitstats_object$set_github_host(...) 7. └─GitHostGitHub$new(...) 8. └─GitStats (local) initialize(...) 9. └─super$initialize(...) 10. └─private$set_token(token = token, verbose = verbose) 11. └─private$check_token(token) 12. └─cli::cli_abort(c(i = "No token provided.")) 13. └─rlang::abort(...) ── Error ('test-z-GitStats.R:110:1'): (code run outside of `test_that()`) ────── Error in `private$check_token(token)`: ℹ No token provided. Backtrace: ▆ 1. ├─base::suppressMessages(...) at test-z-GitStats.R:110:1 2. │ └─base::withCallingHandlers(...) 3. ├─create_gitstats() %>% ... 4. └─GitStats::set_gitlab_host(...) 5. └─gitstats_object$set_gitlab_host(...) 6. └─GitHostGitLab$new(...) 7. └─GitStats (local) initialize(...) 8. └─super$initialize(...) 9. └─private$set_token(token = token, verbose = verbose) 10. └─private$check_token(token) 11. └─cli::cli_abort(c(i = "No token provided.")) 12. └─rlang::abort(...) [ FAIL 35 | WARN 0 | SKIP 54 | PASS 460 ] Error: Test failures Execution halted