File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44#
55# SPDX-License-Identifier: CC0-1.0
66
7+ secondary_approved_image () {
8+ sed -nE ' s/const COMBINE_PCRS_UPDATE_TEST_IMAGE: &str = "(.*)";/\1/p' tests/trusted_execution_cluster.rs
9+ }
710
811# # Special handling for the approved image because of the kind issue with
912# # loading images used by image volumes. See:
1013# # https://github.com/kubernetes-sigs/kind/issues/4099
11- LOCAL_APPROVED_IMAGE=localhost:5000/approved-image:latest
12- docker pull $APPROVED_IMAGE
13- docker tag $APPROVED_IMAGE $LOCAL_APPROVED_IMAGE
14- docker push $LOCAL_APPROVED_IMAGE
15- docker exec -ti kind-control-plane crictl pull $LOCAL_APPROVED_IMAGE
14+ pull_approved_image () {
15+ local image=$1
16+ local index=$2
17+ local local_image=" localhost:5000/approved-image-${index} :latest"
18+ echo " Pulling approved image: $image "
19+ docker pull " $image "
20+ docker tag " $image " " $local_image "
21+ docker push " $local_image "
22+ docker exec -ti kind-control-plane crictl pull " $local_image "
23+ echo " -------------------------------"
24+ }
25+
26+ pull_approved_image " $APPROVED_IMAGE " 0
27+ pull_approved_image " $( secondary_approved_image) " 1
1628
1729KV_VERSION=v1.7.0
1830IMAGES=(
Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ use trusted_cluster_operator_lib::{
2222use trusted_cluster_operator_test_utils:: constants:: * ;
2323use trusted_cluster_operator_test_utils:: * ;
2424
25+ const COMBINE_PCRS_UPDATE_TEST_IMAGE : & str = "quay.io/trusted-execution-clusters/fedora-coreos@sha256:372a5db90a8695fafc2869d438bacd7f0ef7fd84f63746a450bfcd4b8b64ae83" ;
26+
2527fn ak_approved ( ak : Option < & AttestationKey > ) -> bool {
2628 let is_approved = |c : & Condition | c. type_ == "Approved" && c. status == "True" ;
2729 let cs = ak. and_then ( |ak| ak. status . as_ref ( ) . and_then ( |s| s. conditions . as_ref ( ) ) ) ;
@@ -357,7 +359,7 @@ async fn test_approved_image_readoption() -> anyhow::Result<()> {
357359named_test ! {
358360async fn test_combined_image_pcrs_configmap_updates( ) -> anyhow:: Result <( ) > {
359361 let test_ctx = setup!( [
360- "quay.io/trusted-execution-clusters/fedora-coreos@sha256:372a5db90a8695fafc2869d438bacd7f0ef7fd84f63746a450bfcd4b8b64ae83" ,
362+ COMBINE_PCRS_UPDATE_TEST_IMAGE ,
361363 ] ) . await ?;
362364 let client = test_ctx. client( ) ;
363365 let namespace = test_ctx. namespace( ) ;
You can’t perform that action at this time.
0 commit comments