Skip to content
Merged
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
2 changes: 1 addition & 1 deletion base/redhat-8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down
36 changes: 36 additions & 0 deletions tests/test_docker_splunk.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down