diff --git a/base/redhat-8/Dockerfile b/base/redhat-8/Dockerfile index 5c9cc528..21c0d708 100644 --- a/base/redhat-8/Dockerfile +++ b/base/redhat-8/Dockerfile @@ -16,7 +16,7 @@ # the container catalog moved from registry.access.redhat.com to registry.redhat.io # So at some point before they deprecate the old registry we have to make sure that # we have access to the new registry and change where we pull the ubi image from. -FROM registry.access.redhat.com/ubi8/ubi-minimal:8.1 +FROM registry.access.redhat.com/ubi8/ubi-minimal:8.1-328 LABEL name="splunk" \ maintainer="support@splunk.com" \ vendor="splunk" \ diff --git a/tests/test_docker_splunk.py b/tests/test_docker_splunk.py index d85dc9eb..7e657647 100644 --- a/tests/test_docker_splunk.py +++ b/tests/test_docker_splunk.py @@ -703,6 +703,42 @@ def test_adhoc_1so_preplaybook(self): except OSError: pass + def test_adhoc_1so_splunk_launch_conf(self): + # Create a splunk container + cid = None + try: + splunk_container_name = generate_random_string() + cid = self.client.create_container(self.SPLUNK_IMAGE_NAME, tty=True, ports=[8089], name=splunk_container_name, + environment={ + "DEBUG": "true", + "SPLUNK_START_ARGS": "--accept-license", + "SPLUNK_PASSWORD": self.password, + "SPLUNK_LAUNCH_CONF": "OPTIMISTIC_ABOUT_FILE_LOCKING=1,HELLO=WORLD" + }, + host_config=self.client.create_host_config(port_bindings={8089: ("0.0.0.0",)}) + ) + cid = cid.get("Id") + self.client.start(cid) + # Poll for the container to be ready + assert self.wait_for_containers(1, name=splunk_container_name) + # Check splunkd + splunkd_port = self.client.port(cid, 8089)[0]["HostPort"] + url = "https://localhost:{}/services/server/info".format(splunkd_port) + kwargs = {"auth": ("admin", self.password), "verify": False} + status, content = self.handle_request_retry("GET", url, kwargs) + assert status == 200 + # Check splunk-launch.conf + exec_command = self.client.exec_create(cid, r'cat /opt/splunk/etc/splunk-launch.conf', user="splunk") + std_out = self.client.exec_start(exec_command) + assert "OPTIMISTIC_ABOUT_FILE_LOCKING=1" in std_out + assert "HELLO=WORLD" in std_out + except Exception as e: + self.logger.error(e) + raise e + finally: + if cid: + self.client.remove_container(cid, v=True, force=True) + def test_adhoc_1so_change_tailed_files(self): # Create a splunk container cid = None