Skip to content

Commit 8dfeed6

Browse files
committed
MINIFICPP-2680 Move Amazon Kinesis tests to modular docker tests
1 parent a85a6ab commit 8dfeed6

File tree

21 files changed

+77
-470
lines changed

21 files changed

+77
-470
lines changed

docker/test/integration/cluster/ContainerStore.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
from .containers.MinifiContainer import MinifiContainer
1919
from .containers.NifiContainer import NifiContainer
2020
from .containers.NifiContainer import NiFiOptions
21-
from .containers.KinesisServerContainer import KinesisServerContainer
22-
from .containers.S3ServerContainer import S3ServerContainer
2321
from .containers.AzureStorageServerContainer import AzureStorageServerContainer
2422
from .containers.HttpProxyContainer import HttpProxyContainer
2523
from .containers.PostgreSQLServerContainer import PostgreSQLServerContainer
@@ -115,22 +113,6 @@ def acquire_container(self, context, container_name: str, engine='minifi-cpp', c
115113
network=self.network,
116114
image_store=self.image_store,
117115
command=command))
118-
elif engine == 's3-server':
119-
return self.containers.setdefault(container_name,
120-
S3ServerContainer(feature_context=feature_context,
121-
name=container_name,
122-
vols=self.vols,
123-
network=self.network,
124-
image_store=self.image_store,
125-
command=command))
126-
elif engine == 'kinesis-server':
127-
return self.containers.setdefault(container_name,
128-
KinesisServerContainer(feature_context=feature_context,
129-
name=container_name,
130-
vols=self.vols,
131-
network=self.network,
132-
image_store=self.image_store,
133-
command=command))
134116
elif engine == 'azure-storage-server':
135117
return self.containers.setdefault(container_name,
136118
AzureStorageServerContainer(feature_context=feature_context,

docker/test/integration/cluster/DockerTestCluster.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
from .ContainerStore import ContainerStore
2626
from .DockerCommunicator import DockerCommunicator
2727
from .MinifiControllerExecutor import MinifiControllerExecutor
28-
from .checkers.AwsChecker import AwsChecker
2928
from .checkers.AzureChecker import AzureChecker
3029
from .checkers.PostgresChecker import PostgresChecker
3130
from .checkers.PrometheusChecker import PrometheusChecker
@@ -40,7 +39,6 @@ def __init__(self, context, feature_id):
4039
self.vols = {}
4140
self.container_communicator = DockerCommunicator()
4241
self.container_store = ContainerStore(self.container_communicator.create_docker_network(feature_id), context.image_store, context.kubernetes_proxy, feature_id=feature_id)
43-
self.aws_checker = AwsChecker(self.container_communicator)
4442
self.azure_checker = AzureChecker(self.container_communicator)
4543
self.postgres_checker = PostgresChecker(self.container_communicator)
4644
self.prometheus_checker = PrometheusChecker()
@@ -190,26 +188,6 @@ def check_http_proxy_access(self, container_name, url):
190188
and output.count("TCP_MISS") >= output.count("TCP_DENIED"))
191189
or output.count("TCP_DENIED") == 0 and "TCP_MISS" in output)
192190

193-
def check_kinesis_server_record_data(self, container_name, record_data):
194-
container_name = self.container_store.get_container_name_with_postfix(container_name)
195-
return self.aws_checker.check_kinesis_server_record_data(container_name, record_data)
196-
197-
def check_s3_server_object_data(self, container_name, test_data):
198-
container_name = self.container_store.get_container_name_with_postfix(container_name)
199-
return self.aws_checker.check_s3_server_object_data(container_name, test_data)
200-
201-
def check_s3_server_object_hash(self, container_name: str, expected_file_hash: str):
202-
container_name = self.container_store.get_container_name_with_postfix(container_name)
203-
return self.aws_checker.check_s3_server_object_hash(container_name, expected_file_hash)
204-
205-
def check_s3_server_object_metadata(self, container_name, content_type="application/octet-stream", metadata=dict()):
206-
container_name = self.container_store.get_container_name_with_postfix(container_name)
207-
return self.aws_checker.check_s3_server_object_metadata(container_name, content_type, metadata)
208-
209-
def is_s3_bucket_empty(self, container_name):
210-
container_name = self.container_store.get_container_name_with_postfix(container_name)
211-
return self.aws_checker.is_s3_bucket_empty(container_name)
212-
213191
def check_azure_storage_server_data(self, container_name, test_data):
214192
container_name = self.container_store.get_container_name_with_postfix(container_name)
215193
return self.azure_checker.check_azure_storage_server_data(container_name, test_data)

docker/test/integration/cluster/ImageStore.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ def get_image(self, container_engine):
6565
image = self.__build_postgresql_server_image()
6666
elif container_engine == "mqtt-broker":
6767
image = self.__build_mqtt_broker_image()
68-
elif container_engine == "kinesis-server":
69-
image = self.__build_kinesis_image()
7068
else:
7169
raise Exception("There is no associated image for " + container_engine)
7270

@@ -288,9 +286,6 @@ def __build_mqtt_broker_image(self):
288286

289287
return self.__build_image(dockerfile)
290288

291-
def __build_kinesis_image(self):
292-
return self.__build_image_by_path(self.test_dir + "/resources/kinesis-mock", 'kinesis-server')
293-
294289
def __build_image(self, dockerfile, context_files=[]):
295290
conf_dockerfile_buffer = BytesIO()
296291
docker_context_buffer = BytesIO()

docker/test/integration/cluster/checkers/AwsChecker.py

Lines changed: 0 additions & 66 deletions
This file was deleted.

docker/test/integration/cluster/containers/KinesisServerContainer.py

Lines changed: 0 additions & 41 deletions
This file was deleted.

docker/test/integration/cluster/containers/S3ServerContainer.py

Lines changed: 0 additions & 40 deletions
This file was deleted.

docker/test/integration/features/MiNiFi_integration_test_driver.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -275,21 +275,6 @@ def __validate(self, validator):
275275
assert not self.cluster.segfault_happened() or self.cluster.log_app_output()
276276
assert validator.validate() or self.cluster.log_app_output()
277277

278-
def check_kinesis_server_record_data(self, kinesis_container_name, record_data):
279-
assert self.cluster.check_kinesis_server_record_data(kinesis_container_name, record_data) or self.cluster.log_app_output()
280-
281-
def check_s3_server_object_data(self, s3_container_name, object_data):
282-
assert self.cluster.check_s3_server_object_data(s3_container_name, object_data) or self.cluster.log_app_output()
283-
284-
def check_s3_server_large_object_data(self, s3_container_name: str):
285-
assert self.cluster.check_s3_server_object_hash(s3_container_name, self.test_file_hash) or self.cluster.log_app_output()
286-
287-
def check_s3_server_object_metadata(self, s3_container_name, content_type):
288-
assert self.cluster.check_s3_server_object_metadata(s3_container_name, content_type) or self.cluster.log_app_output()
289-
290-
def check_empty_s3_bucket(self, s3_container_name):
291-
assert self.cluster.is_s3_bucket_empty(s3_container_name) or self.cluster.log_app_output()
292-
293278
def check_http_proxy_access(self, http_proxy_container_name, url):
294279
assert self.cluster.check_http_proxy_access(http_proxy_container_name, url) or self.cluster.log_app_output()
295280

docker/test/integration/features/steps/steps.py

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,8 @@ def step_impl(context, processor_type, minifi_container_name):
120120

121121

122122
@given("a {processor_type} processor")
123-
@given("a {processor_type} processor set up to communicate with an s3 server")
124-
@given("a {processor_type} processor set up to communicate with the same s3 server")
125123
@given("a {processor_type} processor set up to communicate with an Azure blob storage")
126124
@given("a {processor_type} processor set up to communicate with an MQTT broker instance")
127-
@given("a {processor_type} processor set up to communicate with the kinesis server")
128125
def step_impl(context, processor_type):
129126
__create_processor(context, processor_type, processor_type, None, None, "minifi-cpp-flow")
130127

@@ -499,18 +496,6 @@ def step_impl(context):
499496
context.test.start('mqtt-broker')
500497

501498

502-
# s3 setup
503-
@given("a s3 server is set up in correspondence with the PutS3Object")
504-
@given("a s3 server is set up in correspondence with the DeleteS3Object")
505-
def step_impl(context):
506-
context.test.acquire_container(context=context, name="s3-server", engine="s3-server")
507-
508-
509-
@given("a kinesis server is set up in correspondence with the PutKinesisStream")
510-
def step_impl(context):
511-
context.test.acquire_container(context=context, name="kinesis-server", engine="kinesis-server")
512-
513-
514499
# azure storage setup
515500
@given("an Azure storage server is set up")
516501
def step_impl(context):
@@ -730,31 +715,6 @@ def step_impl(context, url):
730715
context.test.check_http_proxy_access('http-proxy', url)
731716

732717

733-
@then("there is a record on the kinesis server with \"{record_data}\"")
734-
def step_impl(context, record_data):
735-
context.test.check_kinesis_server_record_data("kinesis-server", record_data)
736-
737-
738-
@then("the object on the s3 server is \"{object_data}\"")
739-
def step_impl(context, object_data):
740-
context.test.check_s3_server_object_data("s3-server", object_data)
741-
742-
743-
@then("the object on the s3 server is present and matches the original hash")
744-
def step_impl(context):
745-
context.test.check_s3_server_large_object_data("s3-server")
746-
747-
748-
@then("the object content type on the s3 server is \"{content_type}\" and the object metadata matches use metadata")
749-
def step_impl(context, content_type):
750-
context.test.check_s3_server_object_metadata("s3-server", content_type)
751-
752-
753-
@then("the object bucket on the s3 server is empty")
754-
def step_impl(context):
755-
context.test.check_empty_s3_bucket("s3-server")
756-
757-
758718
# Azure
759719
@when("test blob \"{blob_name}\" with the content \"{content}\" is created on Azure blob storage")
760720
def step_impl(context, blob_name, content):

docker/test/integration/minifi/processors/DeleteS3Object.py

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)