Skip to content

Commit

Permalink
Merge pull request #8699 from GabyCT/topic/fixconfidentialscript
Browse files Browse the repository at this point in the history
tests: k8s: Fix indentation in confidential common script
  • Loading branch information
GabyCT committed Dec 19, 2023
2 parents 6cea8a5 + 1469a5e commit 5504176
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/integration/kubernetes/confidential_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ source "${BATS_TEST_DIRNAME}/tests_common.sh"

function setup_unencrypted_confidential_pod() {
get_pod_config_dir

export SSH_KEY_FILE="${pod_config_dir}/confidential/unencrypted/ssh/unencrypted"

if [ -n "${PR_NUMBER}" ]; then
# Use correct address in pod yaml
sed -i "s/-nightly/-${PR_NUMBER}/" "${pod_config_dir}/pod-confidential-unencrypted.yaml"
fi

# Set permissions on private key file
sudo chmod 600 "${SSH_KEY_FILE}"
}
Expand All @@ -25,10 +25,10 @@ function setup_unencrypted_confidential_pod() {
# and returns the remote command to be executed to that specific hypervisor
# in order to identify whether the workload is running on a TEE environment
function get_remote_command_per_hypervisor() {
declare -A REMOTE_COMMAND_PER_HYPERVISOR
REMOTE_COMMAND_PER_HYPERVISOR[qemu-sev]="dmesg | grep \"Memory Encryption Features active:.*\(SEV$\|SEV \)\""
REMOTE_COMMAND_PER_HYPERVISOR[qemu-snp]="dmesg | grep \"Memory Encryption Features active:.*SEV-SNP\""
REMOTE_COMMAND_PER_HYPERVISOR[qemu-tdx]="cpuid | grep TDX_GUEST"
declare -A REMOTE_COMMAND_PER_HYPERVISOR
REMOTE_COMMAND_PER_HYPERVISOR[qemu-sev]="dmesg | grep \"Memory Encryption Features active:.*\(SEV$\|SEV \)\""
REMOTE_COMMAND_PER_HYPERVISOR[qemu-snp]="dmesg | grep \"Memory Encryption Features active:.*SEV-SNP\""
REMOTE_COMMAND_PER_HYPERVISOR[qemu-tdx]="cpuid | grep TDX_GUEST"

echo "${REMOTE_COMMAND_PER_HYPERVISOR[${KATA_HYPERVISOR}]}"
echo "${REMOTE_COMMAND_PER_HYPERVISOR[${KATA_HYPERVISOR}]}"
}

0 comments on commit 5504176

Please sign in to comment.