Skip to content

Commit

Permalink
test: fix engine/replica identity error check
Browse files Browse the repository at this point in the history
Signed-off-by: davidko <[email protected]>
  • Loading branch information
innobead authored and David Ko committed Jan 2, 2024
1 parent ae2aeda commit 4ec45f5
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions integration/core/test_identity.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,10 @@ def test_validation_fails_with_client(engine_manager_client,
ENGINE_NAME)
get_controller_version_detail(e_client) # Retries until open socket.
with pytest.raises(grpc.RpcError) as e:
e_client.replica_create('tcp://' +
get_process_address(replica_different))
assert e.value.code() == grpc.StatusCode.UNKNOWN
assert (f'incorrect volume name {VOLUME_NAME}; check replica address') \
in e.value.details()
e_client.replica_create('tcp://' + get_process_address(replica_different))

assert e.value.code() == grpc.StatusCode.FAILED_PRECONDITION
assert f'incorrect volume name {VOLUME_NAME}; check replica address' in e.value.details()

# CASE 8:
# Our sync agent client is right, so we can send it instructions, but it
Expand All @@ -117,10 +116,12 @@ def test_validation_fails_with_client(engine_manager_client,
sync_file_info_tuples = [("some_name", "some_name", 512)]
with pytest.raises(grpc.RpcError) as e:
s_client.sync_files(get_process_address(replica_different),
sync_file_info_tuples, True, 0)
assert e.value.code() == grpc.StatusCode.UNKNOWN
assert (f'incorrect volume name {VOLUME_NAME}; check replica address') \
in e.value.details()
sync_file_info_tuples,
True,
0)

assert e.value.code() == grpc.StatusCode.FAILED_PRECONDITION
assert f'incorrect volume name {VOLUME_NAME}; check replica address' in e.value.details()

def test_validation_fails_with_cli(bin, engine_manager_client, # NOQA
process_manager_client):
Expand Down

0 comments on commit 4ec45f5

Please sign in to comment.