Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

9 failed tests for get_package in access.R and editing.R and 1 note about use of ::: in package #204

Open
justinkadi opened this issue Jul 9, 2024 · 0 comments

Comments

@justinkadi
Copy link
Contributor

The R CMD Check passed because there was no token set. When I ran the test locally with a token from test.arcticdata.io, I got 9 errors. There are also still errors with ::: being used:

Namespace in Imports field not imported from: 'filelock' All declared Imports should be used. Unexported objects imported by ':::' calls: 'dataone:::auth_get' 'dataone:::getErrorDescription' See the note in ?::: about the use of this operator. There are ::: calls to the package's namespace in its code. A package almost never needs to use ::: for its own objects: 'is_resource_map'

Duration: 993.8 s

── Failed tests ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Failure (test_access.R:14:3): get_package works for a simple package
pkg$metadata == get_pkg$metadata is not TRUE

`actual`:       
`expected`: TRUE

Failure (test_access.R:15:3): get_package works for a simple package
pkg$resource_map == get_pkg$resource_map is not TRUE

`actual`:       
`expected`: TRUE

Failure (test_access.R:16:3): get_package works for a simple package
pkg$data == get_pkg$data is not TRUE

`actual`:       
`expected`: TRUE

Error (test_access.R:17:3): get_package works for a simple package
Error: No resource map(s) found for urn:uuid:41d9c199-297c-4e8d-90c4-400e24795e26.
Backtrace:
    ▆
 1. ├─testthat::expect_warning(get_package(mn, pkg$metadata)) at test_access.R:17:2
 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. └─arcticdatautils::get_package(mn, pkg$metadata)
 8.   └─arcticdatautils:::find_newest_resource_map(node, pid) at arcticdatautils/R/util.R:710:4

Error (test_access.R:34:3): get_package works for a package with a child package
Error: No resource map(s) found for urn:uuid:c063d6ec-5952-483d-b117-933fe8ead6d4.
Backtrace:
    ▆
 1. ├─base::suppressWarnings(...) at test_access.R:34:2
 2. │ └─base::withCallingHandlers(...)
 3. └─arcticdatautils::get_package(mn, pkg$metadata) at test_access.R:35:4
 4.   └─arcticdatautils:::find_newest_resource_map(node, pid) at arcticdatautils/R/util.R:710:4

Error (test_access.R:64:3): get_package works the same when given a metadata pid as it does when given a resource map pid
Error: No resource map(s) found for urn:uuid:dc49783a-c02a-4cc6-a1f7-1679befc3421.
Backtrace:
    ▆
 1. ├─base::suppressWarnings(get_package(mn, child_pkg$metadata)) at test_access.R:64:2
 2. │ └─base::withCallingHandlers(...)
 3. └─arcticdatautils::get_package(mn, child_pkg$metadata)
 4.   └─arcticdatautils:::find_newest_resource_map(node, pid) at arcticdatautils/R/util.R:710:4

Failure (test_editing.R:58:3): we can create a resource map
`response` (`actual`) not equal to get_package(mn, response)$resource_map (`expected`).

`actual` is a character vector ('resource_map_urn:uuid:ee2daccc-7e25-47b2-829d-36177377207d')
`expected` is NULL

Failure (test_editing.R:83:3): we can update a resource map
`updated` (`actual`) not equal to pkg$resource_map (`expected`).

`actual`:   "resource_map_urn:uuid:bdb54b24-c768-4f9b-b234-1ac4d2961dcd"
`expected`: "urn:uuid:a9f98e42-5a0c-47e3-ae56-20868f9dc703"             

Failure (test_editing.R:289:3): publish_update removes 'resource_map_pid' from 'parent_child_pids' argument
child$resource_map not equivalent to parent$child_packages.
Types not compatible: character is not NULL```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant