Skip to content

Commit

Permalink
tests/nested: check for plainkey used when tokens are in use
Browse files Browse the repository at this point in the history
  • Loading branch information
valentindavid committed Dec 12, 2024
1 parent 28a38ec commit 941da67
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/nested/core/core22-basic/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,19 @@ execute: |
data_default_platform_name="$(jq -r '.tokens.[]|select(.ubuntu_fde_name=="default").ubuntu_fde_data.platform_name' data.json)"
data_fallback_token_type="$(jq -r '.tokens.[]|select(.ubuntu_fde_name=="default-fallback").type' data.json)"
data_fallback_platform_name="$(jq -r '.tokens.[]|select(.ubuntu_fde_name=="default-fallback").ubuntu_fde_data.platform_name' data.json)"
save_default_token_type="$(jq -r '.tokens.[]|select(.ubuntu_fde_name=="default").type' save.json)"
save_default_platform_name="$(jq -r '.tokens.[]|select(.ubuntu_fde_name=="default").ubuntu_fde_data.platform_name' save.json)"
save_fallback_token_type="$(jq -r '.tokens.[]|select(.ubuntu_fde_name=="default-fallback").type' save.json)"
save_fallback_platform_name="$(jq -r '.tokens.[]|select(.ubuntu_fde_name=="default-fallback").ubuntu_fde_data.platform_name' save.json)"
test "${data_default_token_type}" = "ubuntu-fde"
test "${data_fallback_token_type}" = "ubuntu-fde"
test "${save_default_token_type}" = "ubuntu-fde"
test "${save_fallback_token_type}" = "ubuntu-fde"
test "${data_default_platform_name}" = "tpm2"
test "${data_fallback_platform_name}" = "tpm2"
test "${save_default_platform_name}" = "plainkey"
test "${save_fallback_platform_name}" = "tpm2"
remote.exec "! test -f /run/mnt/ubuntu-boot/device/fde/ubuntu-data.sealed-key"
Expand Down
4 changes: 4 additions & 0 deletions tests/nested/manual/uc20-fde-hooks/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,19 @@ execute: |
data_default_platform_name="$(jq -r '.tokens.[]|select(.ubuntu_fde_name=="default").ubuntu_fde_data.platform_name' data.json)"
data_fallback_token_type="$(jq -r '.tokens.[]|select(.ubuntu_fde_name=="default-fallback").type' data.json)"
data_fallback_platform_name="$(jq -r '.tokens.[]|select(.ubuntu_fde_name=="default-fallback").ubuntu_fde_data.platform_name' data.json)"
save_default_token_type="$(jq -r '.tokens.[]|select(.ubuntu_fde_name=="default").type' save.json)"
save_default_platform_name="$(jq -r '.tokens.[]|select(.ubuntu_fde_name=="default").ubuntu_fde_data.platform_name' save.json)"
save_fallback_token_type="$(jq -r '.tokens.[]|select(.ubuntu_fde_name=="default-fallback").type' save.json)"
save_fallback_platform_name="$(jq -r '.tokens.[]|select(.ubuntu_fde_name=="default-fallback").ubuntu_fde_data.platform_name' save.json)"
test "${data_default_token_type}" = "ubuntu-fde"
test "${data_fallback_token_type}" = "ubuntu-fde"
test "${save_default_token_type}" = "ubuntu-fde"
test "${save_fallback_token_type}" = "ubuntu-fde"
test "${data_default_platform_name}" = "fde-hooks-v3"
test "${data_fallback_platform_name}" = "fde-hooks-v3"
test "${save_default_platform_name}" = "plainkey"
test "${save_fallback_platform_name}" = "fde-hooks-v3"
remote.exec "! test -f /run/mnt/ubuntu-boot/device/fde/ubuntu-data.sealed-key"
Expand Down

0 comments on commit 941da67

Please sign in to comment.