Marc Kupietz | bd9796f | 2025-06-26 15:40:08 +0200 | [diff] [blame] | 1 | # Setup keyring for testing |
| 2 | if (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 | } |