Skip to content

Commit 2cdcddf

Browse files
committed
fix tests
1 parent 8ef5356 commit 2cdcddf

1 file changed

Lines changed: 25 additions & 15 deletions

File tree

tests/consensus_tests/test_shard_snapshot_transfer.py

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,24 @@ def test_shard_snapshot_transfer(tmp_path: pathlib.Path):
101101
# transfer.
102102
#
103103
# Test that data on the both sides is consistent
104-
def test_shard_snapshot_transfer_with_api_key(tmp_path: pathlib.Path):
105-
106-
104+
def test_shard_snapshot_transfer_with_api_key_1(tmp_path: pathlib.Path):
107105
# Configure a random API key
108106
api_key = str(uuid.uuid4())
109107
alt_api_key = str(uuid.uuid4())
110108
env={
111109
"QDRANT__SERVICE__API_KEY": api_key,
112110
}
111+
112+
headers={
113+
"api-key": api_key,
114+
}
115+
shard_snapshot_transfer_with_api_key(tmp_path, env, headers)
116+
117+
118+
def test_shard_snapshot_transfer_with_api_key_2(tmp_path: pathlib.Path):
119+
# Configure a random API key
120+
api_key = str(uuid.uuid4())
121+
alt_api_key = str(uuid.uuid4())
113122
alt_env = {
114123
"QDRANT__SERVICE__API_KEY": api_key,
115124
"QDRANT__SERVICE__ALT_API_KEY": alt_api_key,
@@ -118,21 +127,22 @@ def test_shard_snapshot_transfer_with_api_key(tmp_path: pathlib.Path):
118127
headers={
119128
"api-key": api_key,
120129
}
121-
headers_alt={
122-
"api-key": alt_api_key,
123-
}
124130

125-
tmp_dir_1 = tmp_path / "api_key_instance_1"
126-
tmp_dir_1.mkdir(parents=True, exist_ok=True)
127-
tmp_dir_2 = tmp_path / "api_key_instance_2"
128-
tmp_dir_2.mkdir(parents=True, exist_ok=True)
129-
tmp_dir_3 = tmp_path / "api_key_instance_3"
130-
tmp_dir_3.mkdir(parents=True, exist_ok=True)
131+
shard_snapshot_transfer_with_api_key(tmp_path, alt_env, headers)
131132

132-
shard_snapshot_transfer_with_api_key(tmp_dir_1, env, headers)
133-
shard_snapshot_transfer_with_api_key(tmp_dir_2, alt_env, headers)
134-
shard_snapshot_transfer_with_api_key(tmp_dir_3, alt_env, headers_alt)
133+
def test_shard_snapshot_transfer_with_api_key_3(tmp_path: pathlib.Path):
134+
# Configure a random API key
135+
api_key = str(uuid.uuid4())
136+
alt_api_key = str(uuid.uuid4())
137+
alt_env = {
138+
"QDRANT__SERVICE__API_KEY": api_key,
139+
"QDRANT__SERVICE__ALT_API_KEY": alt_api_key,
140+
}
135141

142+
headers_alt={
143+
"api-key": alt_api_key,
144+
}
145+
shard_snapshot_transfer_with_api_key(tmp_path, alt_env, headers_alt)
136146

137147
def shard_snapshot_transfer_with_api_key(tmp_path: pathlib.Path, env, headers):
138148
assert_project_root()

0 commit comments

Comments
 (0)