From 32394d9b31030852000a3970a42a3732d2325d42 Mon Sep 17 00:00:00 2001 From: Martin Vrachev Date: Mon, 6 Nov 2023 14:33:58 +0200 Subject: [PATCH] Prepare functional tests scripts for md update Signed-off-by: Martin Vrachev --- tests/functional/scripts/run-ft-das.sh | 18 ++++++++++++++++++ tests/functional/scripts/run-ft-signed.sh | 17 +++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/tests/functional/scripts/run-ft-das.sh b/tests/functional/scripts/run-ft-das.sh index 8842cdd3..630056d6 100644 --- a/tests/functional/scripts/run-ft-das.sh +++ b/tests/functional/scripts/run-ft-das.sh @@ -98,5 +98,23 @@ rm metadata/1.root.json wget -P metadata/ ${METADATA_BASE_URL}/1.root.json cp -r metadata ${UMBRELLA_PATH}/ +# Run metadata update to be used later (during FT) +python ${UMBRELLA_PATH}/tests/functional/scripts/rstuf-admin-metadata-update.py '{ + "File name or URL to the current root metadata": "metadata/1.root.json", + "(Authz threshold 1/2) Choose root key type [ed25519/ecdsa/rsa] (ed25519)": "", + "(Authz threshold 1/2) Enter the root`s private key path": "tests/files/key_storage/JanisJoplin.key", + "(Authz threshold 1/2) Enter the root`s private key password": "strongPass", + "(Authz threshold 2/2) Choose root key type [ed25519/ecdsa/rsa] (ed25519)": "", + "(Authz threshold 2/2) Enter the root`s private key path": "tests/files/key_storage/JimiHendrix.key", + "(Authz threshold 2/2) Enter the root`s private key password": "strongPass", + "Do you want to extend the root`s expiration?": "y", + "Days to extend root`s expiration starting from today (365)": "", + "New root expiration: YYYY-M-DD. Do you agree?": "y", + "Do you want to modify root keys? [y/n]": "n", + "Do you want to change the online key?": "n" +}' + +cp ./metadata-update-payload.json ${UMBRELLA_PATH} + make -C ${UMBRELLA_PATH}/ functional-tests-exitfirst diff --git a/tests/functional/scripts/run-ft-signed.sh b/tests/functional/scripts/run-ft-signed.sh index 1b0b7bc6..ff7170cf 100644 --- a/tests/functional/scripts/run-ft-signed.sh +++ b/tests/functional/scripts/run-ft-signed.sh @@ -81,5 +81,22 @@ rm metadata/1.root.json wget -P metadata/ ${METADATA_BASE_URL}/1.root.json cp -r metadata ${UMBRELLA_PATH}/ +python ${UMBRELLA_PATH}/tests/functional/scripts/rstuf-admin-metadata-update.py '{ + "File name or URL to the current root metadata": "metadata/1.root.json", + "(Authz threshold 1/2) Choose root key type [ed25519/ecdsa/rsa] (ed25519)": "", + "(Authz threshold 1/2) Enter the root`s private key path": "tests/files/key_storage/JanisJoplin.key", + "(Authz threshold 1/2) Enter the root`s private key password": "strongPass", + "(Authz threshold 2/2) Choose root key type [ed25519/ecdsa/rsa] (ed25519)": "", + "(Authz threshold 2/2) Enter the root`s private key path": "tests/files/key_storage/JanisJoplin.key", + "(Authz threshold 2/2) Enter the root`s private key password": "strongPass", + "Do you want to extend the root`s expiration?": "y", + "Days to extend root`s expiration starting from today (365)": "", + "New root expiration: YYYY-M-DD. Do you agree?": "y", + "Do you want to modify root keys? [y/n]": "n", + "Do you want to change the online key?": "n" +}' + +cp ./metadata-update-payload.json ${UMBRELLA_PATH} + make -C ${UMBRELLA_PATH}/ functional-tests-exitfirst