From 5fc9d336916eab65a49f1c6a088fc2758379233e Mon Sep 17 00:00:00 2001 From: Marco Esters Date: Fri, 6 Sep 2024 12:51:30 -0700 Subject: [PATCH] Skip keychain domains --- scripts/create_self_signed_certificates_macos.sh | 4 +--- tests/conftest.py | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/create_self_signed_certificates_macos.sh b/scripts/create_self_signed_certificates_macos.sh index 0896e9ed2..c94a7a48f 100755 --- a/scripts/create_self_signed_certificates_macos.sh +++ b/scripts/create_self_signed_certificates_macos.sh @@ -26,10 +26,8 @@ INSTALLER_SIGNING_ID=${INSTALLER_SIGNING_ID:-${INSTALLER_ROOT}} # which is why it is unsed on the CI. if [[ -n "${ON_CI}" ]]; then KEYCHAIN_PATH="/Library/Keychains/System.keychain" - KEYCHAIN_DOMAIN="system" else KEYCHAIN_PATH="${ROOT_DIR}/constructor.keychain-db" - KEYCHAIN_DOMAIN="user" fi security create-keychain -p "${KEYCHAIN_PASSWORD}" "${KEYCHAIN_PATH}" @@ -88,4 +86,4 @@ done # Add keychain at the beginning of the keychain list # Must be removed at a later clean-up step # shellcheck disable=SC2046 -security list-keychains -d ${KEYCHAIN_DOMAIN} -s "${KEYCHAIN_PATH}" $(security list-keychains | xargs) +security list-keychains -s "${KEYCHAIN_PATH}" $(security list-keychains | xargs) diff --git a/tests/conftest.py b/tests/conftest.py index 65fcdbe21..214d761a8 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -11,7 +11,7 @@ @pytest.fixture def self_signed_certificate_macos(tmp_path): p = subprocess.run( - ["security", "list-keychains", "-d", "user"], + ["security", "list-keychains"], capture_output=True, text=True, ) @@ -65,4 +65,4 @@ def self_signed_certificate_macos(tmp_path): capture_output=True, text=True, ) - subprocess.run(["security", "list-keychains", "-d", "user", "-s", *current_keychains]) + subprocess.run(["security", "list-keychains", "-s", *current_keychains])