Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def __init__(self, test_context: MinifiTestContext):
echo 'acl authenticated proxy_auth REQUIRED' >> /etc/squid/squid.conf && \
echo 'http_access allow authenticated' >> /etc/squid/squid.conf && \
echo 'http_port {proxy_port}' >> /etc/squid/squid.conf && \
echo 'negative_dns_ttl 0 seconds' >> /etc/squid/squid.conf && \
echo 'max_filedescriptors 1024' >> /etc/squid/squid.conf
""".format(base_image='ubuntu/squid:5.2-22.04_beta', proxy_username='admin', proxy_password='test101',
proxy_port='3128'))
Expand Down
21 changes: 21 additions & 0 deletions extensions/standard-processors/tests/features/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# limitations under the License.

import platform
import docker
from minifi_test_framework.core.hooks import common_before_scenario
from minifi_test_framework.core.hooks import common_after_scenario

Expand All @@ -28,8 +29,28 @@ def before_feature(context, feature):
feature.skip("This feature is only x86/x64 compatible")


def is_minifi_image_alpine_based(context):
client: docker.DockerClient = docker.from_env()
container = client.containers.create(
image=context.minifi_container_image,
command=['cat', '/etc/os-release'],
)
try:
container.start()
result = container.logs()
container.remove(force=True)
except docker.errors.APIError:
container.remove(force=True)
return False

return "alpine" in result.decode('utf-8').lower()


def before_scenario(context, scenario):
common_before_scenario(context, scenario)
if "ALPINE_ONLY" in scenario.tags:
if not is_minifi_image_alpine_based(context):
scenario.skip("This scenario is only compatible with Alpine-based Minifi images")


def after_scenario(context, scenario):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
@CORE
Feature: Flow file and content repositories work as expected

@ALPINE_ONLY
Scenario: Flow file content is removed from memory when terminated when using Volatile Content Repository
Given a GenerateFlowFile processor with the "File Size" property set to "20 MB"
And the scheduling period of the GenerateFlowFile processor is set to "1 sec"
Expand Down
Loading