Skip to content

Commit 130b2db

Browse files
zacdav-dbZac Davies
andauthored
Coverage change for Query History Tests (#96)
* changes required to get codecov checks running for higher % * Adjusting QH test coverage --------- Co-authored-by: Zac Davies <[email protected]>
1 parent d9214f9 commit 130b2db

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

tests/testthat/test-query-history.R

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,25 @@
1+
test_that("Query History API - don't perform", {
2+
withr::local_envvar(c(
3+
"DATABRICKS_HOST" = "http://mock_host",
4+
"DATABRICKS_TOKEN" = "mock_token"
5+
))
6+
7+
resp_history3 <- db_sql_query_history(
8+
user_ids = c(1, 2, 3),
9+
endpoint_ids = c("X", "Y", "Z"),
10+
max_results = 1,
11+
include_metrics = TRUE,
12+
perform_request = FALSE
13+
)
14+
expect_s3_class(resp_history3, "httr2_request")
15+
})
16+
117
skip_on_cran()
218
skip_unless_credentials_set()
319
skip_unless_authenticated()
420
skip_unless_aws_workspace()
521

6-
test_that("query history API", {
7-
22+
test_that("Query History API", {
823
expect_no_error(
924
resp_history <- db_sql_query_history(
1025
max_results = 1
@@ -19,17 +34,4 @@ test_that("query history API", {
1934
end_time_ms = as.integer(Sys.time()) * 1000
2035
)
2136
)
22-
23-
resp_history3 <- db_sql_query_history(
24-
user_ids = c(1, 2, 3),
25-
endpoint_ids = c("X", "Y", "Z"),
26-
max_results = 1,
27-
include_metrics = TRUE,
28-
perform_request = FALSE
29-
)
30-
expect_s3_class(resp_history3, "httr2_request")
31-
32-
3337
})
34-
35-

0 commit comments

Comments
 (0)