Skip to content

Commit e9f291c

Browse files
Fix parallel backup tests (#375)
Ported from canonical/mysql-operator#355 Noticed in https://warthogs.atlassian.net/browse/DPE-3387
1 parent e0dcfd8 commit e9f291c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/integration/test_backups.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import logging
66
import socket
7+
import uuid
78
from pathlib import Path
89

910
import boto3
@@ -63,17 +64,21 @@ def cloud_credentials(
6364

6465
@pytest.fixture(scope="session")
6566
def cloud_configs(microceph: pytest_microceph.ConnectionInformation):
67+
# Add UUID to path to avoid conflict with tests running in parallel (e.g. multiple Juju
68+
# versions on a PR, multiple PRs)
69+
path = f"mysql-k8s/{uuid.uuid4()}"
70+
6671
return {
6772
"aws": {
6873
"endpoint": "https://s3.amazonaws.com",
6974
"bucket": "data-charms-testing",
70-
"path": "mysql-k8s",
75+
"path": path,
7176
"region": "us-east-1",
7277
},
7378
"gcp": {
7479
"endpoint": "https://storage.googleapis.com",
7580
"bucket": "data-charms-testing",
76-
"path": "mysql-k8s",
81+
"path": path,
7782
"region": "",
7883
},
7984
"ceph": {

0 commit comments

Comments
 (0)