Skip to content

Commit

Permalink
chore: fix and inline custom domains test (#2130)
Browse files Browse the repository at this point in the history
  • Loading branch information
r-birkner authored Oct 18, 2024
1 parent e31dc4c commit d346b93
Show file tree
Hide file tree
Showing 16 changed files with 284 additions and 172 deletions.
30 changes: 27 additions & 3 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ members = [
"rs/test_utilities/tmpdir",
"rs/tests",
"rs/tests/boundary_nodes",
"rs/tests/boundary_nodes/custom_domains",
"rs/tests/boundary_nodes/integration_test_common",
"rs/tests/boundary_nodes/performance_test_common",
"rs/tests/boundary_nodes/utils",
Expand Down
42 changes: 0 additions & 42 deletions rs/tests/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -408,45 +408,3 @@ oci_tar(
image = "@bitcoind",
repo_tags = ["bitcoind:pinned"],
)

oci_tar(
name = "coredns.tar",
image = "@coredns",
repo_tags = ["coredns:latest"],
)

oci_tar(
name = "pebble.tar",
image = "@pebble",
repo_tags = ["pebble:latest"],
)

oci_tar(
name = "python3.tar",
image = "@python3",
repo_tags = ["python3:latest"],
)

oci_tar(
name = "openssl.tar",
image = "@alpine_openssl",
repo_tags = ["openssl:latest"],
)

uvm_config_image(
name = "custom_domains_uvm_config_image",
srcs = [
# Docker images
":coredns_tar",
":openssl_tar",
":pebble_tar",
":python3_tar",

# Assets
":src/custom_domains_integration/activate.sh",
":src/custom_domains_integration/pebble_cache.py",
":src/custom_domains_integration/cloudflare_api.py",
],
remap_paths = {"activate.sh": "activate"},
tags = ["manual"], # this target will be built if required as a dependency of another target
)
7 changes: 0 additions & 7 deletions rs/tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ bincode = { workspace = true }
bitcoincore-rpc = "0.15.0"
candid = { workspace = true }
canister-test = { path = "../rust_canisters/canister_test" }
certificate_orchestrator_interface = { path = "../boundary_node/certificate_issuance/certificate_orchestrator_interface" }
chacha20poly1305 = "0.10.0"
chrono = { workspace = true }
crossbeam-channel = { workspace = true }
cycles-minting-canister = { path = "../nns/cmc" }
Expand Down Expand Up @@ -114,7 +112,6 @@ ic_consensus_threshold_sig_system_test_utils = { path = "./consensus/tecdsa/util
icp-ledger = { path = "../ledger_suite/icp" }
icrc-ledger-agent = { path = "../../packages/icrc-ledger-agent" }
icrc-ledger-types = { path = "../../packages/icrc-ledger-types" }
indoc = "1.0.9"
itertools = { workspace = true }
json5 = "0.4.1"
k256 = { workspace = true }
Expand Down Expand Up @@ -269,10 +266,6 @@ path = "testing_verification/test_driver_e2e_scenarios.rs"
name = "ic-systest-bn-update-workload-test"
path = "boundary_nodes/bn_update_workload_test.rs"

[[bin]]
name = "ic-systest-custom-domains-integration"
path = "boundary_nodes/custom_domains_integration_test.rs"

[[bin]]
name = "ic-systest-mainnet"
path = "testing_verification/mainnet_test.rs"
Expand Down
20 changes: 1 addition & 19 deletions rs/tests/boundary_nodes/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("//rs/tests:common.bzl", "BOUNDARY_NODE_GUESTOS_RUNTIME_DEPS", "COUNTER_CANISTER_RUNTIME_DEPS", "CUSTOM_DOMAINS_RUNTIME_DEPS", "DEPENDENCIES", "GRAFANA_RUNTIME_DEPS", "GUESTOS_RUNTIME_DEPS", "MACRO_DEPENDENCIES", "UNIVERSAL_VM_RUNTIME_DEPS")
load("//rs/tests:common.bzl", "BOUNDARY_NODE_GUESTOS_RUNTIME_DEPS", "COUNTER_CANISTER_RUNTIME_DEPS", "DEPENDENCIES", "GRAFANA_RUNTIME_DEPS", "GUESTOS_RUNTIME_DEPS", "MACRO_DEPENDENCIES", "UNIVERSAL_VM_RUNTIME_DEPS")
load("//rs/tests:system_tests.bzl", "system_test", "system_test_nns")

package(default_visibility = ["//rs:system-tests-pkg"])
Expand Down Expand Up @@ -178,24 +178,6 @@ system_test(
],
)

system_test_nns(
name = "custom_domains_integration_test",
env = {
"CERTIFICATE_ORCHESTRATOR_WASM_PATH": "$(rootpath //rs/boundary_node/certificate_issuance/certificate_orchestrator:certificate_orchestrator)",
},
proc_macro_deps = MACRO_DEPENDENCIES,
tags = [
"manual",
],
target_compatible_with = ["@platforms//os:linux"], # requires libssh that does not build on Mac OS
runtime_deps = BOUNDARY_NODE_GUESTOS_RUNTIME_DEPS +
GUESTOS_RUNTIME_DEPS +
UNIVERSAL_VM_RUNTIME_DEPS +
CERTIFICATE_ORCHESTRATOR_RUNTIME_DEPS +
CUSTOM_DOMAINS_RUNTIME_DEPS,
deps = DEPENDENCIES + ["//rs/tests"],
)

system_test_nns(
name = "api_bn_decentralization_test",
extra_head_nns_tags = [], # don't run the head_nns variant on nightly since it aleady runs on long_test.
Expand Down
99 changes: 99 additions & 0 deletions rs/tests/boundary_nodes/custom_domains/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
load("//rs/tests:common.bzl", "BOUNDARY_NODE_GUESTOS_RUNTIME_DEPS", "GUESTOS_RUNTIME_DEPS", "MACRO_DEPENDENCIES", "UNIVERSAL_VM_RUNTIME_DEPS")
load("//rs/tests:system_tests.bzl", "oci_tar", "system_test_nns", "uvm_config_image")

package(default_visibility = ["//rs:system-tests-pkg"])

CERTIFICATE_ORCHESTRATOR_RUNTIME_DEPS = ["//rs/boundary_node/certificate_issuance/certificate_orchestrator:certificate_orchestrator"]

oci_tar(
name = "coredns.tar",
image = "@coredns",
repo_tags = ["coredns:latest"],
)

oci_tar(
name = "pebble.tar",
image = "@pebble",
repo_tags = ["pebble:latest"],
)

oci_tar(
name = "python3.tar",
image = "@python3",
repo_tags = ["python3:latest"],
)

oci_tar(
name = "openssl.tar",
image = "@alpine_openssl",
repo_tags = ["openssl:latest"],
)

uvm_config_image(
name = "custom_domains_uvm_config_image",
srcs = [
# Docker images
":coredns_tar",
":openssl_tar",
":pebble_tar",
":python3_tar",

# Assets
":activate.sh",
":pebble_cache.py",
":cloudflare_api.py",
],
remap_paths = {"activate.sh": "activate"},
tags = ["manual"], # this target will be built if required as a dependency of another target
)

# This system test is meant for manual testing of the boundary node custom domain offering.
# It runs through all the steps from registering a custom domain, to accessing, to updating, and
# finally removing it. This test is not meant to run as part of a regular pipeline.
system_test_nns(
name = "custom_domains_integration_test",
srcs = [
"setup.rs",
],
crate_root = "custom_domains_integration_test.rs",
env = {
"CERTIFICATE_ORCHESTRATOR_WASM_PATH": "$(rootpath //rs/boundary_node/certificate_issuance/certificate_orchestrator:certificate_orchestrator)",
"CUSTOM_DOMAIN_UVM_CONFIG_PATH": "$(rootpath :custom_domains_uvm_config_image)",
"ASSET_CANISTER_WASM_PATH": "$(rootpath @asset_canister//file)",
},
proc_macro_deps = MACRO_DEPENDENCIES,
tags = [
"manual",
],
target_compatible_with = ["@platforms//os:linux"], # requires libssh that does not build on Mac OS
runtime_deps = BOUNDARY_NODE_GUESTOS_RUNTIME_DEPS +
GUESTOS_RUNTIME_DEPS +
UNIVERSAL_VM_RUNTIME_DEPS +
CERTIFICATE_ORCHESTRATOR_RUNTIME_DEPS + [
":custom_domains_uvm_config_image",
"@asset_canister//file",
],
deps = [
# Keep sorted.
"//rs/boundary_node/certificate_issuance/certificate_orchestrator_interface",
"//rs/interfaces/registry",
"//rs/protobuf",
"//rs/registry/keys",
"//rs/registry/nns_data_provider",
"//rs/registry/routing_table",
"//rs/registry/subnet_type",
"//rs/tests/driver:ic-system-test-driver",
"@crate_index//:anyhow",
"@crate_index//:candid",
"@crate_index//:chacha20poly1305",
"@crate_index//:ic-agent",
"@crate_index//:k256",
"@crate_index//:pem",
"@crate_index//:rand",
"@crate_index//:rand_chacha",
"@crate_index//:reqwest",
"@crate_index//:serde_json",
"@crate_index//:slog",
"@crate_index//:tokio",
],
)
34 changes: 34 additions & 0 deletions rs/tests/boundary_nodes/custom_domains/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[package]
name = "ic-boundary-nodes-custom-domains-test"
version.workspace = true
authors.workspace = true
edition.workspace = true
description.workspace = true
documentation.workspace = true

[dependencies]
anyhow = { workspace = true }
candid = { workspace = true }
chacha20poly1305 = "0.10.0"
certificate_orchestrator_interface = { path = "../../../boundary_node/certificate_issuance/certificate_orchestrator_interface" }
ic-agent = { workspace = true }
ic-interfaces-registry = { path = "../../../interfaces/registry" }
ic-protobuf = { path = "../../../protobuf" }
ic-registry-keys = { path = "../../../registry/keys" }
ic-registry-nns-data-provider = { path = "../../../registry/nns_data_provider" }
ic-registry-routing-table = { path = "../../../registry/routing_table" }
ic-registry-subnet-type = { path = "../../../registry/subnet_type" }
ic-system-test-driver = { path = "../../driver" }
indoc = "1.0.9"
k256 = { workspace = true }
pem = "1.0.1"
rand = { workspace = true }
rand_chacha = { workspace = true }
reqwest = { workspace = true }
serde_json = { workspace = true }
slog = { workspace = true }
tokio = { workspace = true }

[[bin]]
name = "ic-systest-custom-domains-integration"
path = "custom_domains_integration_test.rs"
Loading

0 comments on commit d346b93

Please sign in to comment.