зеркало из https://github.com/Azure/AzureRMR.git
update tests, news
This commit is contained in:
Родитель
7d843f95dc
Коммит
c29cf2283f
2
NEWS.md
2
NEWS.md
|
@ -1,6 +1,6 @@
|
|||
# AzureRMR 2.1.0.9000
|
||||
|
||||
* Some refactoring of login code to better handle AzureAuth options.
|
||||
* Some refactoring of login code to better handle AzureAuth options. As part of this, the `config_file` argument for `az_rm$new` has been removed; to use a configuration file, call the (recommended) `create_azure_login` function.
|
||||
* `az_subscription$get_provider_api_version` now returns only stable APIs by default. Set the argument `stable_only=FALSE` to allow returning preview APIs.
|
||||
|
||||
# AzureRMR 2.1.0
|
||||
|
|
|
@ -9,18 +9,13 @@ if(tenant == "" || app == "" || password == "" || subscription == "")
|
|||
skip("Authentication tests skipped: ARM credentials not set")
|
||||
|
||||
|
||||
suppressWarnings(file.remove(file.path(AzureR_dir(), "arm_logins.json")))
|
||||
|
||||
test_that("ARM authentication works",
|
||||
{
|
||||
az <- az_rm$new(tenant=tenant, app=app, password=password)
|
||||
expect_is(az, "az_rm")
|
||||
expect_true(is_azure_token(az$token))
|
||||
|
||||
creds <- tempfile(fileext=".json")
|
||||
writeLines(jsonlite::toJSON(list(tenant=tenant, app=app, password=password)), creds)
|
||||
|
||||
az2 <- az_rm$new(config_file=creds)
|
||||
expect_is(az2, "az_rm")
|
||||
expect_true(is_azure_token(az2$token))
|
||||
})
|
||||
|
||||
test_that("Login interface works",
|
||||
|
@ -35,6 +30,7 @@ test_that("Login interface works",
|
|||
writeLines(jsonlite::toJSON(list(tenant=tenant, app=app, password=password)), creds)
|
||||
|
||||
az4 <- create_azure_login(config_file=creds)
|
||||
expect_identical(AzureAuth::normalize_tenant(tenant), az4$tenant)
|
||||
expect_is(az4, "az_rm")
|
||||
|
||||
az5 <- get_azure_login(tenant)
|
||||
|
|
Загрузка…
Ссылка в новой задаче