mirror of
https://github.com/NixOS/nix.git
synced 2025-12-22 17:01:08 +01:00
test(s3-binary-cache-store): clear credential cache between tests
This commit is contained in:
parent
11f108d898
commit
0595c5f7ee
1 changed files with 9 additions and 0 deletions
|
|
@ -164,6 +164,15 @@ in
|
||||||
"""
|
"""
|
||||||
def decorator(test_func):
|
def decorator(test_func):
|
||||||
def wrapper():
|
def wrapper():
|
||||||
|
# Restart nix-daemon on both machines to clear the credential provider cache.
|
||||||
|
# The AwsCredentialProviderImpl singleton persists in the daemon process,
|
||||||
|
# and its cache can cause credentials from previous tests to be reused.
|
||||||
|
# We reset-failed first to avoid systemd's start rate limiting.
|
||||||
|
server.succeed("systemctl reset-failed nix-daemon.service nix-daemon.socket")
|
||||||
|
server.succeed("systemctl restart nix-daemon")
|
||||||
|
client.succeed("systemctl reset-failed nix-daemon.service nix-daemon.socket")
|
||||||
|
client.succeed("systemctl restart nix-daemon")
|
||||||
|
|
||||||
bucket = str(uuid.uuid4())
|
bucket = str(uuid.uuid4())
|
||||||
server.succeed(f"mc mb minio/{bucket}")
|
server.succeed(f"mc mb minio/{bucket}")
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue