Skip to content

Commit

Permalink
Merge branch 'quentin/useAppManagementAPI' into 'master'
Browse files Browse the repository at this point in the history
chore(tests): update tankeradminsdk to 2.0.0

See merge request TankerHQ/sdk-react-native!78
  • Loading branch information
quentinvernot committed Mar 15, 2022
2 parents 59f4b28 + f626c65 commit 94db718
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
12 changes: 7 additions & 5 deletions adminserver/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ def assert_env(name: str) -> str:


def make_admin() -> tankeradminsdk.Admin:
id_token = assert_env("TANKER_ID_TOKEN")
url = assert_env("TANKER_ADMIND_URL")
return tankeradminsdk.Admin(url=url, id_token=id_token)
return tankeradminsdk.Admin(
app_management_token=assert_env("TANKER_MANAGEMENT_API_ACCESS_TOKEN"),
environment_name=assert_env("TANKER_MANAGEMENT_API_DEFAULT_ENVIRONMENT_NAME"),
url=assert_env("TANKER_MANAGEMENT_API_URL"),
)


admin = make_admin()
tanker_app = admin.create_app("test-react-native", is_test=True)
tanker_app = admin.create_app("test-react-native")
print(f'created app {tanker_app["id"]}')


Expand Down Expand Up @@ -65,7 +67,7 @@ def toggle_preverified_verification() -> str:
def create_identity() -> str:
return tankersdk_identity.create_identity(
tanker_app["id"],
tanker_app["app_secret"],
tanker_app["secret"],
str(random.random()),
)

Expand Down
11 changes: 5 additions & 6 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ secondary = true
[tool.poetry.dependencies]
python = "^3.8"
tankerci = { version = ">= 2022.02.4061", source = "gitlab" }
tankeradminsdk = { version = "1.2.0", source = "gitlab" }
tankeradminsdk = { version = "^2.0.0", source = "gitlab" }
Flask = "^2.0.3"
tankersdk-identity = "^1.3.4"

Expand Down

0 comments on commit 94db718

Please sign in to comment.