Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
nmattia committed Nov 14, 2024
1 parent 4684870 commit aaff32c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
11 changes: 6 additions & 5 deletions rs/tests/driver/src/driver/test_env_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,8 @@ pub fn get_elasticsearch_hosts() -> Result<Vec<String>> {
pub fn get_ic_os_img_url() -> Result<Url> {
//let url = read_dependency_from_env_to_string("ENV_DEPS__DEV_DISK_IMG_TAR_ZST_CAS_URL")?;
let sha256 = get_ic_os_img_sha256()?;
let url = format!("https://artifacts.zh1-idx1.dfinity.network/cas/{sha256}");
// TODO: use artifacts.idx.dfinity.network (hits the redirect server)
let url = format!("https://artifacts.idx.dfinity.network/cas/{sha256}");
Ok(Url::parse(&url)?)
}

Expand All @@ -1142,7 +1143,7 @@ pub fn get_ic_os_img_sha256() -> Result<String> {

pub fn get_malicious_ic_os_img_url() -> Result<Url> {
let sha256 = get_malicious_ic_os_img_sha256()?;
let url = format!("https://artifacts.zh1-idx1.dfinity.network/cas/{sha256}");
let url = format!("https://artifacts.idx.dfinity.network/cas/{sha256}");
Ok(Url::parse(&url)?)
}

Expand All @@ -1156,7 +1157,7 @@ pub fn get_malicious_ic_os_img_sha256() -> Result<String> {
pub fn get_ic_os_update_img_url() -> Result<Url> {
//let url = read_dependency_from_env_to_string("ENV_DEPS__DEV_UPDATE_IMG_TAR_ZST_CAS_URL")?;
let sha256 = get_ic_os_update_img_sha256()?;
let url = format!("https://artifacts.zh1-idx1.dfinity.network/cas/{sha256}");
let url = format!("https://artifacts.idx.dfinity.network/cas/{sha256}");
Ok(Url::parse(&url)?)
}

Expand All @@ -1180,7 +1181,7 @@ pub fn get_ic_os_update_img_test_sha256() -> Result<String> {

pub fn get_malicious_ic_os_update_img_url() -> Result<Url> {
let sha256 = get_malicious_ic_os_update_img_sha256()?;
let url = format!("https://artifacts.zh1-idx1.dfinity.network/cas/{sha256}");
let url = format!("https://artifacts.idx.dfinity.network/cas/{sha256}");
Ok(Url::parse(&url)?)
}

Expand Down Expand Up @@ -1219,7 +1220,7 @@ pub fn get_mainnet_ic_os_update_img_url() -> Result<Url> {
pub fn get_hostos_update_img_test_url() -> Result<Url> {
// TODO: look up from env (no need to repeat this every time)
let sha256 = get_hostos_update_img_test_sha256()?;
let url = format!("https://artifacts.zh1-idx1.dfinity.network/cas/{sha256}");
let url = format!("https://artifacts.idx.dfinity.network/cas/{sha256}");
Ok(Url::parse(&url)?)
}

Expand Down
7 changes: 6 additions & 1 deletion rs/tests/system_tests.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ def _run_system_test(ctx):
echo found ic-os image "$image"
image_sha256=$(sha256sum "$image" | cut -d' ' -f1)
echo " sha256: '$image_sha256'"
url="https://artifacts.zh1-idx1.dfinity.network/cas/$image_sha256"
# TODO: explain
# TODO: extract URL and use config
url="http://server.bazel-remote.svc.cluster.local:8080/cas/$image_sha256"
echo " image CAS URL is '$url'"
Expand All @@ -38,6 +41,8 @@ def _run_system_test(ctx):
fi
done
echo done images
# We export RUNFILES such that the from_location_specified_by_env_var() function in
# rs/rust_canisters/canister_test/src/canister.rs can find canisters
# relative to the $RUNFILES directory.
Expand Down

0 comments on commit aaff32c

Please sign in to comment.