forked from scylladb/scylla-cluster-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_sync.py
More file actions
25 lines (20 loc) · 746 Bytes
/
test_sync.py
File metadata and controls
25 lines (20 loc) · 746 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import socket
from pathlib import Path
import pytest
from sdcm.keystore import KeyStore
@pytest.mark.integration
def test_multiple_sync_on_lots_of_files():
"""
this start multiple client of boto3 in multiple thread,
opening boto3 session isn't thread safe, so this test is to make sure our lock is working
"""
def is_using_aws_mock():
try:
socket.gethostbyname("aws-mock.itself")
return True
except socket.gaierror:
return False
if not is_using_aws_mock():
key_store = KeyStore()
key_store.sync(keys=['scylla-qa-ec2', 'scylla-test', 'scylla_test_id_ed25519'] * 20,
local_path=Path('~/.ssh/').expanduser(), permissions=0o0600)