From d6d13f69b53bfeb37fd5087814dd29498596ff23 Mon Sep 17 00:00:00 2001 From: Nicolas Mattia Date: Thu, 21 Nov 2024 17:51:40 +0100 Subject: [PATCH] wip --- rs/tests/driver/src/driver/test_env_api.rs | 4 ++-- rs/tests/system_tests.bzl | 10 +++------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/rs/tests/driver/src/driver/test_env_api.rs b/rs/tests/driver/src/driver/test_env_api.rs index 22f44632931..7efdea65426 100644 --- a/rs/tests/driver/src/driver/test_env_api.rs +++ b/rs/tests/driver/src/driver/test_env_api.rs @@ -1151,7 +1151,7 @@ pub fn get_sha256_from_cas_url(img_name: &str, url: &Url) -> Result { } pub fn get_ic_os_img_url() -> Result { - let url = std::env::var("ENV_DEPS__DEV_DISK_IMG_TAR_ZST_CAS_URL").unwrap(); + let url = std::env::var("ENV_DEPS__DEV_DISK_IMG_TAR_ZST_CAS_URL")?; Ok(Url::parse(&url)?) } @@ -1160,7 +1160,7 @@ pub fn get_ic_os_img_sha256() -> Result { } pub fn get_malicious_ic_os_img_url() -> Result { - let url = std::env::var("ENV_DEPS__DEV_MALICIOUS_DISK_IMG_TAR_ZST_CAS_URL").unwrap(); // TODO: + let url = std::env::var("ENV_DEPS__DEV_MALICIOUS_DISK_IMG_TAR_ZST_CAS_URL")?; Ok(Url::parse(&url)?) } diff --git a/rs/tests/system_tests.bzl b/rs/tests/system_tests.bzl index cf37c0e501b..6023de67455 100644 --- a/rs/tests/system_tests.bzl +++ b/rs/tests/system_tests.bzl @@ -83,10 +83,9 @@ def _run_system_test(ctx): if k8s: env["KUBECONFIG"] = ctx.file._k8sconfig.path - env["UPLOAD_SYSTEST_DEP"] = ctx.executable._upload_systest_deps.short_path + env["UPLOAD_SYSTEST_DEP"] = ctx.executable._upload_systest_dep.short_path runtime_deps = [depset([ctx.file._k8sconfig])] - for target in ctx.attr.runtime_deps: runtime_deps.append(target.files) @@ -94,9 +93,6 @@ def _run_system_test(ctx): runtime_deps.append(t.files) env[e] = t.files.to_list()[0].short_path - for e, t in ctx.attr.icos_images.items(): - runtime_deps.append(t.files) - return [ DefaultInfo( executable = run_test_script_file, @@ -104,7 +100,7 @@ def _run_system_test(ctx): files = [ run_test_script_file, ctx.executable.src, - ctx.executable._upload_systest_deps, + ctx.executable._upload_systest_dep, ctx.version_file, ], transitive_files = depset( @@ -128,7 +124,7 @@ run_system_test = rule( "env": attr.string_dict(allow_empty = True), "_k8s": attr.label(default = "//rs/tests:k8s"), "_k8sconfig": attr.label(allow_single_file = True, default = "@kubeconfig//:kubeconfig.yaml"), - "_upload_systest_deps": attr.label(executable = True, cfg = "exec", default = "//bazel:upload_systest_deps"), + "_upload_systest_dep": attr.label(executable = True, cfg = "exec", default = "//bazel:upload_systest_dep"), "runtime_deps": attr.label_list(allow_files = True), "env_deps": attr.string_keyed_label_dict(allow_files = True), "icos_images": attr.string_keyed_label_dict(allow_files = True),