Skip to content

Commit

Permalink
check more methods
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau-lilly committed Dec 8, 2023
1 parent 31b4c78 commit 0c37ec5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
12 changes: 12 additions & 0 deletions R/crew_aws_batch_monitor.R
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,18 @@ crew_class_aws_batch_monitor <- R6::R6Class(
)
}
}
if (!length(out)) {
out[[length(out) + 1L]] <- tibble::tibble(
name = character(0L),
id = character(0L),
arn = character(0L),
status = character(0L),
reason = character(0L),
created = numeric(0L),
started = numeric(0L),
stopped = numeric(0L)
)
}
out <- do.call(what = rbind, args = out)
out$status <- tolower(out$status)
out[out$status %in% status, ]
Expand Down
7 changes: 7 additions & 0 deletions tests/monitor/jobs.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ x$submit(
)
job <- x$submit()
out <- x$jobs()
expect_true(tibble::is_tibble(x$submitted()))
expect_true(tibble::is_tibble(x$active()))
expect_true(tibble::is_tibble(x$inactive()))
expect_true(tibble::is_tibble(x$pending()))
expect_true(tibble::is_tibble(x$runnable()))
expect_true(tibble::is_tibble(x$succeeded()))
expect_true(tibble::is_tibble(x$failed()))
expect_true(nrow(out) > 0L)
expect_true(job$name %in% out$name)
expect_true(job$id %in% out$id)
Expand Down

0 comments on commit 0c37ec5

Please sign in to comment.