From d278fd6eaad3194b6d2347876d4fe24948f1cb2c Mon Sep 17 00:00:00 2001 From: Bert Blommers Date: Sun, 22 Aug 2021 15:14:46 +0100 Subject: [PATCH] Batch - remove duplicate tests (#4208) --- tests/test_batch/test_batch_job_queue.py | 87 ------------------------ 1 file changed, 87 deletions(-) diff --git a/tests/test_batch/test_batch_job_queue.py b/tests/test_batch/test_batch_job_queue.py index db9c4036c..41612baf8 100644 --- a/tests/test_batch/test_batch_job_queue.py +++ b/tests/test_batch/test_batch_job_queue.py @@ -125,93 +125,6 @@ def test_create_job_queue_without_compute_environment(): err["Message"].should.equal("At least 1 compute environment must be provided") -@mock_ec2 -@mock_ecs -@mock_iam -@mock_batch -def test_describe_job_queue_unknown_value(): - ec2_client, iam_client, ecs_client, logs_client, batch_client = _get_clients() - - resp = batch_client.describe_job_queues(jobQueues=["test_invalid_queue"]) - resp.should.have.key("jobQueues").being.length_of(0) - - -@mock_ec2 -@mock_ecs -@mock_iam -@mock_batch -def test_create_job_queue_twice(): - ec2_client, iam_client, ecs_client, logs_client, batch_client = _get_clients() - vpc_id, subnet_id, sg_id, iam_arn = _setup(ec2_client, iam_client) - - compute_name = "test_compute_env" - resp = batch_client.create_compute_environment( - computeEnvironmentName=compute_name, - type="UNMANAGED", - state="ENABLED", - serviceRole=iam_arn, - ) - compute_env_arn = resp["computeEnvironmentArn"] - - batch_client.create_job_queue( - jobQueueName="test_job_queue", - state="ENABLED", - priority=123, - computeEnvironmentOrder=[{"order": 123, "computeEnvironment": compute_env_arn}], - ) - with pytest.raises(ClientError) as ex: - batch_client.create_job_queue( - jobQueueName="test_job_queue", - state="ENABLED", - priority=123, - computeEnvironmentOrder=[ - {"order": 123, "computeEnvironment": compute_env_arn} - ], - ) - - err = ex.value.response["Error"] - err["Code"].should.equal("ClientException") - err["Message"].should.equal("Job queue test_job_queue already exists") - - -@mock_ec2 -@mock_ecs -@mock_iam -@mock_batch -def test_create_job_queue_incorrect_state(): - ec2_client, iam_client, ecs_client, logs_client, batch_client = _get_clients() - - with pytest.raises(ClientError) as ex: - batch_client.create_job_queue( - jobQueueName="test_job_queue2", - state="JUNK", - priority=123, - computeEnvironmentOrder=[], - ) - err = ex.value.response["Error"] - err["Code"].should.equal("ClientException") - err["Message"].should.equal("state JUNK must be one of ENABLED | DISABLED") - - -@mock_ec2 -@mock_ecs -@mock_iam -@mock_batch -def test_create_job_queue_without_compute_environment(): - ec2_client, iam_client, ecs_client, logs_client, batch_client = _get_clients() - - with pytest.raises(ClientError) as ex: - batch_client.create_job_queue( - jobQueueName="test_job_queue3", - state="ENABLED", - priority=123, - computeEnvironmentOrder=[], - ) - err = ex.value.response["Error"] - err["Code"].should.equal("ClientException") - err["Message"].should.equal("At least 1 compute environment must be provided") - - @mock_ec2 @mock_ecs @mock_iam