Skip to content

Commit

Permalink
Removing redundant tests
Browse files Browse the repository at this point in the history
  • Loading branch information
finn committed Aug 16, 2018
1 parent 13ed124 commit 00a9ca5
Showing 1 changed file with 0 additions and 45 deletions.
45 changes: 0 additions & 45 deletions tests/integration/bots_service.py
Expand Up @@ -216,51 +216,6 @@ def test_work_rejected_by_bot(bot_session, context, instance):
context.set_code.assert_called_once_with(grpc.StatusCode.UNIMPLEMENTED)


@pytest.mark.parametrize("state", [LeaseState.LEASE_STATE_UNSPECIFIED, LeaseState.PENDING])
def test_work_out_of_sync_from_pending(state, bot_session, context, instance):
request = bots_pb2.CreateBotSessionRequest(parent='',
bot_session=bot_session)
# Inject work
action_digest = remote_execution_pb2.Digest(hash='gaff')
instance._instance._scheduler.append_job(job.Job(action_digest))
# Simulated the severed binding between client and server
bot = copy.deepcopy(instance.CreateBotSession(request, context))

request = bots_pb2.UpdateBotSessionRequest(name=bot.name,
bot_session=bot)

response = copy.deepcopy(instance.UpdateBotSession(request, context))

response.leases[0].state = state.value

request = bots_pb2.UpdateBotSessionRequest(name=response.name,
bot_session=response)

response = instance.UpdateBotSession(request, context)

context.set_code.assert_called_once_with(grpc.StatusCode.DATA_LOSS)


@pytest.mark.parametrize("state", [LeaseState.LEASE_STATE_UNSPECIFIED, LeaseState.PENDING])
def test_work_out_of_sync_from_active(state, bot_session, context, instance):
request = bots_pb2.CreateBotSessionRequest(parent='',
bot_session=bot_session)
# Inject work
action_digest = remote_execution_pb2.Digest(hash='gaff')
instance._instance._scheduler.append_job(job.Job(action_digest))
# Simulated the severed binding between client and server
bot = copy.deepcopy(instance.CreateBotSession(request, context))

request = bots_pb2.UpdateBotSessionRequest(name=bot.name,
bot_session=bot)

response = copy.deepcopy(instance.UpdateBotSession(request, context))

response = instance.UpdateBotSession(request, context)

context.set_code.assert_called_once_with(grpc.StatusCode.UNIMPLEMENTED)


@pytest.mark.parametrize("state", [LeaseState.LEASE_STATE_UNSPECIFIED, LeaseState.PENDING])
def test_work_out_of_sync_from_pending(state, bot_session, context, instance):
request = bots_pb2.CreateBotSessionRequest(parent='',
Expand Down

0 comments on commit 00a9ca5

Please sign in to comment.