blob: 7e06933e44cc07704247f8f393ea3b7c46a513ba [file] [log] [blame]
Marc Kupietzbd9796f2025-06-26 15:40:08 +02001# Setup keyring for testing
2if (requireNamespace("keyring", quietly = TRUE)) {
3 # Set environment variables to use a non-interactive keyring backend
4 # This prevents password prompts during testing
5 if (!nzchar(Sys.getenv("KEYRING_BACKEND"))) {
6 Sys.setenv("KEYRING_BACKEND" = "env")
7 }
8
9 # Alternatively, if env backend doesn't work, try file backend with empty password
10 if (!nzchar(Sys.getenv("KEYRING_PASS"))) {
11 Sys.setenv("KEYRING_PASS" = "")
12 }
13}