From 7a8d5856b8dc6fbfa06e22b3a6e13481916ed970 Mon Sep 17 00:00:00 2001 From: Eric Swanson Date: Tue, 17 Sep 2024 14:16:45 -0700 Subject: [PATCH 1/3] test: install nns if dfx.json references extension-defined canister type Also use newer nns extension version Part of https://dfinity.atlassian.net/browse/SDK-1832 --- e2e/tests-dfx/cycles-ledger.bash | 2 +- e2e/tests-dfx/extension.bash | 55 ++++++++++++++++++++++++++++++-- 2 files changed, 53 insertions(+), 4 deletions(-) diff --git a/e2e/tests-dfx/cycles-ledger.bash b/e2e/tests-dfx/cycles-ledger.bash index 481923ec32..7c20cbf057 100644 --- a/e2e/tests-dfx/cycles-ledger.bash +++ b/e2e/tests-dfx/cycles-ledger.bash @@ -25,7 +25,7 @@ teardown() { start_and_install_nns() { dfx_start_for_nns_install - dfx extension install nns --version 0.4.3 + dfx extension install nns --version 0.4.7 dfx nns install --ledger-accounts "$(dfx ledger account-id --identity cycle-giver)" } diff --git a/e2e/tests-dfx/extension.bash b/e2e/tests-dfx/extension.bash index 0b56c07240..28ed5bbcaa 100644 --- a/e2e/tests-dfx/extension.bash +++ b/e2e/tests-dfx/extension.bash @@ -14,8 +14,57 @@ teardown() { standard_teardown } +@test "run an extension command with a canister type defined by another extension" { + install_shared_asset subnet_type/shared_network_settings/system + dfx_start_for_nns_install + + install_asset wasm/identity + CACHE_DIR=$(dfx cache show) + mkdir -p "$CACHE_DIR"/extensions/embera + cat > "$CACHE_DIR"/extensions/embera/extension.json < dfx.json < Date: Fri, 15 Nov 2024 15:29:28 -0800 Subject: [PATCH 2/3] revert a small change --- e2e/tests-dfx/extension.bash | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/e2e/tests-dfx/extension.bash b/e2e/tests-dfx/extension.bash index 28ed5bbcaa..7b1d81d26d 100644 --- a/e2e/tests-dfx/extension.bash +++ b/e2e/tests-dfx/extension.bash @@ -63,8 +63,7 @@ EOF @test "extension canister type" { - install_shared_asset subnet_type/shared_network_settings/system - dfx_start_for_nns_install + dfx_start install_asset wasm/identity CACHE_DIR=$(dfx cache show) From 268d831d77ac862ab8f84e26c4be669edf665f0c Mon Sep 17 00:00:00 2001 From: Eric Swanson Date: Fri, 15 Nov 2024 16:03:02 -0800 Subject: [PATCH 3/3] update message --- e2e/tests-dfx/extension.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/tests-dfx/extension.bash b/e2e/tests-dfx/extension.bash index 7b1d81d26d..7aa52b2122 100644 --- a/e2e/tests-dfx/extension.bash +++ b/e2e/tests-dfx/extension.bash @@ -242,7 +242,7 @@ install_extension_from_dfx_extensions_repo() { assert_match 'snsx' assert_command dfx --help - assert_match 'snsx.*Toolkit for' + assert_match 'snsx.*Initialize, deploy and interact with an SNS' assert_command dfx snsx --help