PBM-1442 PBM-1443: improve pbm diagnostic #1111
41 tests run, 24 passed, 8 skipped, 9 failed.
Annotations
Check failure on line 75 in psmdb-testing/pbm-functional/pytest/test_rename_replicaset.py
github-actions / JUnit Test Report
test_rename_replicaset.test_logical_pitr_crud_PBM_T270[inserts]
AssertionError: assert 'cloning namespace (--ns-to) is already in use' in 'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n'
+ where 'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n' = CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7f51a25b1b10>, exit_status=1, command=b'pbm ...'', _stderr=b'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n').stderr
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7f51978b3410>
collection = 'inserts'
@pytest.mark.timeout(300,func_only=True)
@pytest.mark.parametrize('collection',['inserts','replaces','updates','deletes','indexes'])
def test_logical_pitr_crud_PBM_T270(start_cluster,cluster,collection):
cluster.check_pbm_status()
cluster.make_backup("logical")
cluster.enable_pitr(pitr_extra_args="--set pitr.oplogSpanMin=0.1")
time.sleep(5)
for i in range(10):
client = pymongo.MongoClient(cluster.connection)
client["test"]["inserts"].insert_one({"key": i+10, "data": i+10})
client["test"]["replaces"].replace_one({"key": i}, {"key": i+10, "data": i+10})
client["test"]["updates"].update_one({"key": i}, {"$inc": { "data": 10 }})
client["test"]["deletes"].delete_one({"key": i})
client["test"]["indexes"].drop_index("old_index")
client["test"]["indexes"].create_index("data",name="new_index")
time.sleep(5)
pitr = datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%S")
pitr=" --time=" + pitr
Cluster.log("Time for PITR is: " + pitr)
time.sleep(10)
cluster.disable_pitr()
time.sleep(5)
backup_to_fail=pitr + " --ns-from=test." + collection + " --ns-to=test.test"
result=cluster.exec_pbm_cli("restore" + backup_to_fail + " --wait")
assert result.rc != 0
> assert "cloning namespace (--ns-to) is already in use" in result.stderr
E AssertionError: assert 'cloning namespace (--ns-to) is already in use' in 'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n'
E + where 'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n' = CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7f51a25b1b10>, exit_status=1, command=b'pbm ...'', _stderr=b'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n').stderr
test_rename_replicaset.py:75: AssertionError
Check failure on line 75 in psmdb-testing/pbm-functional/pytest/test_rename_replicaset.py
github-actions / JUnit Test Report
test_rename_replicaset.test_logical_pitr_crud_PBM_T270[replaces]
AssertionError: assert 'cloning namespace (--ns-to) is already in use' in 'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n'
+ where 'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n' = CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7f51a25b1b10>, exit_status=1, command=b'pbm ...'', _stderr=b'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n').stderr
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7f51978b3410>
collection = 'replaces'
@pytest.mark.timeout(300,func_only=True)
@pytest.mark.parametrize('collection',['inserts','replaces','updates','deletes','indexes'])
def test_logical_pitr_crud_PBM_T270(start_cluster,cluster,collection):
cluster.check_pbm_status()
cluster.make_backup("logical")
cluster.enable_pitr(pitr_extra_args="--set pitr.oplogSpanMin=0.1")
time.sleep(5)
for i in range(10):
client = pymongo.MongoClient(cluster.connection)
client["test"]["inserts"].insert_one({"key": i+10, "data": i+10})
client["test"]["replaces"].replace_one({"key": i}, {"key": i+10, "data": i+10})
client["test"]["updates"].update_one({"key": i}, {"$inc": { "data": 10 }})
client["test"]["deletes"].delete_one({"key": i})
client["test"]["indexes"].drop_index("old_index")
client["test"]["indexes"].create_index("data",name="new_index")
time.sleep(5)
pitr = datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%S")
pitr=" --time=" + pitr
Cluster.log("Time for PITR is: " + pitr)
time.sleep(10)
cluster.disable_pitr()
time.sleep(5)
backup_to_fail=pitr + " --ns-from=test." + collection + " --ns-to=test.test"
result=cluster.exec_pbm_cli("restore" + backup_to_fail + " --wait")
assert result.rc != 0
> assert "cloning namespace (--ns-to) is already in use" in result.stderr
E AssertionError: assert 'cloning namespace (--ns-to) is already in use' in 'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n'
E + where 'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n' = CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7f51a25b1b10>, exit_status=1, command=b'pbm ...'', _stderr=b'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n').stderr
test_rename_replicaset.py:75: AssertionError
Check failure on line 75 in psmdb-testing/pbm-functional/pytest/test_rename_replicaset.py
github-actions / JUnit Test Report
test_rename_replicaset.test_logical_pitr_crud_PBM_T270[updates]
AssertionError: assert 'cloning namespace (--ns-to) is already in use' in 'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n'
+ where 'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n' = CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7f51a25b1b10>, exit_status=1, command=b'pbm ...'', _stderr=b'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n').stderr
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7f51978b3410>
collection = 'updates'
@pytest.mark.timeout(300,func_only=True)
@pytest.mark.parametrize('collection',['inserts','replaces','updates','deletes','indexes'])
def test_logical_pitr_crud_PBM_T270(start_cluster,cluster,collection):
cluster.check_pbm_status()
cluster.make_backup("logical")
cluster.enable_pitr(pitr_extra_args="--set pitr.oplogSpanMin=0.1")
time.sleep(5)
for i in range(10):
client = pymongo.MongoClient(cluster.connection)
client["test"]["inserts"].insert_one({"key": i+10, "data": i+10})
client["test"]["replaces"].replace_one({"key": i}, {"key": i+10, "data": i+10})
client["test"]["updates"].update_one({"key": i}, {"$inc": { "data": 10 }})
client["test"]["deletes"].delete_one({"key": i})
client["test"]["indexes"].drop_index("old_index")
client["test"]["indexes"].create_index("data",name="new_index")
time.sleep(5)
pitr = datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%S")
pitr=" --time=" + pitr
Cluster.log("Time for PITR is: " + pitr)
time.sleep(10)
cluster.disable_pitr()
time.sleep(5)
backup_to_fail=pitr + " --ns-from=test." + collection + " --ns-to=test.test"
result=cluster.exec_pbm_cli("restore" + backup_to_fail + " --wait")
assert result.rc != 0
> assert "cloning namespace (--ns-to) is already in use" in result.stderr
E AssertionError: assert 'cloning namespace (--ns-to) is already in use' in 'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n'
E + where 'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n' = CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7f51a25b1b10>, exit_status=1, command=b'pbm ...'', _stderr=b'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n').stderr
test_rename_replicaset.py:75: AssertionError
Check failure on line 75 in psmdb-testing/pbm-functional/pytest/test_rename_replicaset.py
github-actions / JUnit Test Report
test_rename_replicaset.test_logical_pitr_crud_PBM_T270[deletes]
AssertionError: assert 'cloning namespace (--ns-to) is already in use' in 'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n'
+ where 'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n' = CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7f51a25b1b10>, exit_status=1, command=b'pbm ...'', _stderr=b'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n').stderr
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7f51978b3410>
collection = 'deletes'
@pytest.mark.timeout(300,func_only=True)
@pytest.mark.parametrize('collection',['inserts','replaces','updates','deletes','indexes'])
def test_logical_pitr_crud_PBM_T270(start_cluster,cluster,collection):
cluster.check_pbm_status()
cluster.make_backup("logical")
cluster.enable_pitr(pitr_extra_args="--set pitr.oplogSpanMin=0.1")
time.sleep(5)
for i in range(10):
client = pymongo.MongoClient(cluster.connection)
client["test"]["inserts"].insert_one({"key": i+10, "data": i+10})
client["test"]["replaces"].replace_one({"key": i}, {"key": i+10, "data": i+10})
client["test"]["updates"].update_one({"key": i}, {"$inc": { "data": 10 }})
client["test"]["deletes"].delete_one({"key": i})
client["test"]["indexes"].drop_index("old_index")
client["test"]["indexes"].create_index("data",name="new_index")
time.sleep(5)
pitr = datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%S")
pitr=" --time=" + pitr
Cluster.log("Time for PITR is: " + pitr)
time.sleep(10)
cluster.disable_pitr()
time.sleep(5)
backup_to_fail=pitr + " --ns-from=test." + collection + " --ns-to=test.test"
result=cluster.exec_pbm_cli("restore" + backup_to_fail + " --wait")
assert result.rc != 0
> assert "cloning namespace (--ns-to) is already in use" in result.stderr
E AssertionError: assert 'cloning namespace (--ns-to) is already in use' in 'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n'
E + where 'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n' = CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7f51a25b1b10>, exit_status=1, command=b'pbm ...'', _stderr=b'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n').stderr
test_rename_replicaset.py:75: AssertionError
Check failure on line 75 in psmdb-testing/pbm-functional/pytest/test_rename_replicaset.py
github-actions / JUnit Test Report
test_rename_replicaset.test_logical_pitr_crud_PBM_T270[indexes]
AssertionError: assert 'cloning namespace (--ns-to) is already in use' in 'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n'
+ where 'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n' = CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7f51a25b1b10>, exit_status=1, command=b'pbm ...'', _stderr=b'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n').stderr
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7f51978b3410>
collection = 'indexes'
@pytest.mark.timeout(300,func_only=True)
@pytest.mark.parametrize('collection',['inserts','replaces','updates','deletes','indexes'])
def test_logical_pitr_crud_PBM_T270(start_cluster,cluster,collection):
cluster.check_pbm_status()
cluster.make_backup("logical")
cluster.enable_pitr(pitr_extra_args="--set pitr.oplogSpanMin=0.1")
time.sleep(5)
for i in range(10):
client = pymongo.MongoClient(cluster.connection)
client["test"]["inserts"].insert_one({"key": i+10, "data": i+10})
client["test"]["replaces"].replace_one({"key": i}, {"key": i+10, "data": i+10})
client["test"]["updates"].update_one({"key": i}, {"$inc": { "data": 10 }})
client["test"]["deletes"].delete_one({"key": i})
client["test"]["indexes"].drop_index("old_index")
client["test"]["indexes"].create_index("data",name="new_index")
time.sleep(5)
pitr = datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%S")
pitr=" --time=" + pitr
Cluster.log("Time for PITR is: " + pitr)
time.sleep(10)
cluster.disable_pitr()
time.sleep(5)
backup_to_fail=pitr + " --ns-from=test." + collection + " --ns-to=test.test"
result=cluster.exec_pbm_cli("restore" + backup_to_fail + " --wait")
assert result.rc != 0
> assert "cloning namespace (--ns-to) is already in use" in result.stderr
E AssertionError: assert 'cloning namespace (--ns-to) is already in use' in 'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n'
E + where 'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n' = CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7f51a25b1b10>, exit_status=1, command=b'pbm ...'', _stderr=b'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n').stderr
test_rename_replicaset.py:75: AssertionError
Check failure on line 129 in psmdb-testing/pbm-functional/pytest/test_rename_replicaset.py
github-actions / JUnit Test Report
test_rename_replicaset.test_logical_pitr_with_txn_PBM_T271[inserts]
AssertionError: assert 'cloning namespace (--ns-to) is already in use' in 'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n'
+ where 'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n' = CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7f51a25b1b10>, exit_status=1, command=b'pbm ...'', _stderr=b'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n').stderr
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7f51978b3410>
collection = 'inserts'
@pytest.mark.timeout(300,func_only=True)
@pytest.mark.parametrize('collection',['inserts','replaces','updates','deletes'])
def test_logical_pitr_with_txn_PBM_T271(start_cluster,cluster,collection):
cluster.check_pbm_status()
cluster.make_backup("logical")
cluster.enable_pitr(pitr_extra_args="--set pitr.oplogSpanMin=0.1")
time.sleep(5)
for i in range(10):
client = pymongo.MongoClient(cluster.connection)
with client.start_session() as session:
with session.start_transaction():
client["test"]["inserts"].insert_one({"key": i+10, "data": i+10}, session=session)
client["test"]["replaces"].replace_one({"key": i}, {"key": i+10, "data": i+10}, session=session)
client["test"]["updates"].update_one({"key": i}, {"$inc": { "data": 10 }}, session=session)
client["test"]["deletes"].delete_one({"key": i}, session=session)
session.commit_transaction()
time.sleep(5)
pitr = datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%S")
pitr=" --time=" + pitr
Cluster.log("Time for PITR is: " + pitr)
time.sleep(10)
cluster.disable_pitr()
time.sleep(5)
backup_to_fail=pitr + " --ns-from=test." + collection + " --ns-to=test.test"
result=cluster.exec_pbm_cli("restore" + backup_to_fail + " --wait")
assert result.rc != 0
> assert "cloning namespace (--ns-to) is already in use" in result.stderr
E AssertionError: assert 'cloning namespace (--ns-to) is already in use' in 'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n'
E + where 'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n' = CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7f51a25b1b10>, exit_status=1, command=b'pbm ...'', _stderr=b'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n').stderr
test_rename_replicaset.py:129: AssertionError
Check failure on line 129 in psmdb-testing/pbm-functional/pytest/test_rename_replicaset.py
github-actions / JUnit Test Report
test_rename_replicaset.test_logical_pitr_with_txn_PBM_T271[replaces]
AssertionError: assert 'cloning namespace (--ns-to) is already in use' in 'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n'
+ where 'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n' = CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7f51a25b1b10>, exit_status=1, command=b'pbm ...'', _stderr=b'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n').stderr
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7f51978b3410>
collection = 'replaces'
@pytest.mark.timeout(300,func_only=True)
@pytest.mark.parametrize('collection',['inserts','replaces','updates','deletes'])
def test_logical_pitr_with_txn_PBM_T271(start_cluster,cluster,collection):
cluster.check_pbm_status()
cluster.make_backup("logical")
cluster.enable_pitr(pitr_extra_args="--set pitr.oplogSpanMin=0.1")
time.sleep(5)
for i in range(10):
client = pymongo.MongoClient(cluster.connection)
with client.start_session() as session:
with session.start_transaction():
client["test"]["inserts"].insert_one({"key": i+10, "data": i+10}, session=session)
client["test"]["replaces"].replace_one({"key": i}, {"key": i+10, "data": i+10}, session=session)
client["test"]["updates"].update_one({"key": i}, {"$inc": { "data": 10 }}, session=session)
client["test"]["deletes"].delete_one({"key": i}, session=session)
session.commit_transaction()
time.sleep(5)
pitr = datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%S")
pitr=" --time=" + pitr
Cluster.log("Time for PITR is: " + pitr)
time.sleep(10)
cluster.disable_pitr()
time.sleep(5)
backup_to_fail=pitr + " --ns-from=test." + collection + " --ns-to=test.test"
result=cluster.exec_pbm_cli("restore" + backup_to_fail + " --wait")
assert result.rc != 0
> assert "cloning namespace (--ns-to) is already in use" in result.stderr
E AssertionError: assert 'cloning namespace (--ns-to) is already in use' in 'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n'
E + where 'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n' = CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7f51a25b1b10>, exit_status=1, command=b'pbm ...'', _stderr=b'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n').stderr
test_rename_replicaset.py:129: AssertionError
Check failure on line 129 in psmdb-testing/pbm-functional/pytest/test_rename_replicaset.py
github-actions / JUnit Test Report
test_rename_replicaset.test_logical_pitr_with_txn_PBM_T271[updates]
AssertionError: assert 'cloning namespace (--ns-to) is already in use' in 'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n'
+ where 'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n' = CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7f51a25b1b10>, exit_status=1, command=b'pbm ...'', _stderr=b'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n').stderr
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7f51978b3410>
collection = 'updates'
@pytest.mark.timeout(300,func_only=True)
@pytest.mark.parametrize('collection',['inserts','replaces','updates','deletes'])
def test_logical_pitr_with_txn_PBM_T271(start_cluster,cluster,collection):
cluster.check_pbm_status()
cluster.make_backup("logical")
cluster.enable_pitr(pitr_extra_args="--set pitr.oplogSpanMin=0.1")
time.sleep(5)
for i in range(10):
client = pymongo.MongoClient(cluster.connection)
with client.start_session() as session:
with session.start_transaction():
client["test"]["inserts"].insert_one({"key": i+10, "data": i+10}, session=session)
client["test"]["replaces"].replace_one({"key": i}, {"key": i+10, "data": i+10}, session=session)
client["test"]["updates"].update_one({"key": i}, {"$inc": { "data": 10 }}, session=session)
client["test"]["deletes"].delete_one({"key": i}, session=session)
session.commit_transaction()
time.sleep(5)
pitr = datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%S")
pitr=" --time=" + pitr
Cluster.log("Time for PITR is: " + pitr)
time.sleep(10)
cluster.disable_pitr()
time.sleep(5)
backup_to_fail=pitr + " --ns-from=test." + collection + " --ns-to=test.test"
result=cluster.exec_pbm_cli("restore" + backup_to_fail + " --wait")
assert result.rc != 0
> assert "cloning namespace (--ns-to) is already in use" in result.stderr
E AssertionError: assert 'cloning namespace (--ns-to) is already in use' in 'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n'
E + where 'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n' = CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7f51a25b1b10>, exit_status=1, command=b'pbm ...'', _stderr=b'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n').stderr
test_rename_replicaset.py:129: AssertionError
Check failure on line 129 in psmdb-testing/pbm-functional/pytest/test_rename_replicaset.py
github-actions / JUnit Test Report
test_rename_replicaset.test_logical_pitr_with_txn_PBM_T271[deletes]
AssertionError: assert 'cloning namespace (--ns-to) is already in use' in 'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n'
+ where 'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n' = CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7f51a25b1b10>, exit_status=1, command=b'pbm ...'', _stderr=b'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n').stderr
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7f51978b3410>
collection = 'deletes'
@pytest.mark.timeout(300,func_only=True)
@pytest.mark.parametrize('collection',['inserts','replaces','updates','deletes'])
def test_logical_pitr_with_txn_PBM_T271(start_cluster,cluster,collection):
cluster.check_pbm_status()
cluster.make_backup("logical")
cluster.enable_pitr(pitr_extra_args="--set pitr.oplogSpanMin=0.1")
time.sleep(5)
for i in range(10):
client = pymongo.MongoClient(cluster.connection)
with client.start_session() as session:
with session.start_transaction():
client["test"]["inserts"].insert_one({"key": i+10, "data": i+10}, session=session)
client["test"]["replaces"].replace_one({"key": i}, {"key": i+10, "data": i+10}, session=session)
client["test"]["updates"].update_one({"key": i}, {"$inc": { "data": 10 }}, session=session)
client["test"]["deletes"].delete_one({"key": i}, session=session)
session.commit_transaction()
time.sleep(5)
pitr = datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%S")
pitr=" --time=" + pitr
Cluster.log("Time for PITR is: " + pitr)
time.sleep(10)
cluster.disable_pitr()
time.sleep(5)
backup_to_fail=pitr + " --ns-from=test." + collection + " --ns-to=test.test"
result=cluster.exec_pbm_cli("restore" + backup_to_fail + " --wait")
assert result.rc != 0
> assert "cloning namespace (--ns-to) is already in use" in result.stderr
E AssertionError: assert 'cloning namespace (--ns-to) is already in use' in 'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n'
E + where 'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n' = CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7f51a25b1b10>, exit_status=1, command=b'pbm ...'', _stderr=b'Error: parse --ns-from and --ns-to options: cloning with restore to the point-in-time is not possible\n').stderr
test_rename_replicaset.py:129: AssertionError