Skip to content

Commit

Permalink
update tests to match new network interface defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
atoulme committed Sep 15, 2023
1 parent 769b0ac commit f437cde
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions internal/buildscripts/packaging/tests/installer_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def verify_config_file(container, path, key, value, exists=True):
assert not match, f"'{line}' found in {path}:\n{config}"


def verify_env_file(container, mode="agent", config_path=None, memory=TOTAL_MEMORY, listen_addr="0.0.0.0", ballast=None):
def verify_env_file(container, mode="agent", config_path=None, memory=TOTAL_MEMORY, listen_addr="127.0.0.1", ballast=None):
env_path = SPLUNK_ENV_PATH
if container.exec_run(f"test -f {OLD_SPLUNK_ENV_PATH}").exit_code == 0:
env_path = OLD_SPLUNK_ENV_PATH
Expand Down Expand Up @@ -227,7 +227,7 @@ def test_installer_custom(distro, arch):
install_cmd = " ".join((
get_installer_cmd(),
"--with-fluentd",
"--listen-interface 127.0.0.1",
"--listen-interface 10.0.0.1",
"--memory 256",
"--ballast 64",
f"--service-user {service_owner} --service-group {service_owner}",
Expand All @@ -250,7 +250,7 @@ def test_installer_custom(distro, arch):
assert output.decode("utf-8").strip() == f"otelcol version v{collector_version}"

# verify env file created with configured parameters
verify_env_file(container, config_path=custom_config, memory="256", listen_addr="127.0.0.1", ballast="64")
verify_env_file(container, config_path=custom_config, memory="256", listen_addr="10.0.0.1", ballast="64")

# verify collector service status
assert wait_for(lambda: service_is_running(container, service_owner=service_owner))
Expand Down
2 changes: 1 addition & 1 deletion tests/zeroconfig/windows/testdata/Dockerfile.iis.server
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ RUN `
$token = $Env:ACCESS_TOKEN_TMP; `
$collector_msi_path = (dir "c:\setup\splunk-otel-collector-*.msi").FullName; `
[string]$network_interface = "127.0.0.1",
c:\setup\install.ps1 -access_token $token -msi_path $collector_msi_path -with_dotnet_instrumentation $true -deployment_env zc-iis-test -ingest_url "http://splunk-otel-collector:9943" -trace_url "http://splunk-otel-collector:7276/v2/trace" -network_interface="0.0.0.0"
c:\setup\install.ps1 -access_token $token -msi_path $collector_msi_path -with_dotnet_instrumentation $true -deployment_env zc-iis-test -ingest_url "http://splunk-otel-collector:9943" -trace_url "http://splunk-otel-collector:7276/v2/trace" -network_interface "0.0.0.0"
ENV ACCESS_TOKEN_TMP=

COPY apps/bin/aspnetfxapp/_PublishedWebsites/AspNet.WebApi.NetFramework/ /apps/aspnetfx
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ENV ACCESS_TOKEN_TMP=$access_token
RUN `
$token = $Env:ACCESS_TOKEN_TMP; `
$collector_msi_path = (dir "c:\setup\splunk-otel-collector-*.msi").FullName; `
c:\setup\install.ps1 -access_token $token -msi_path $collector_msi_path -with_fluentd $false -ingest_url "http://192.0.2.1:12345" -trace_url "http://192.0.2.1:12345"
c:\setup\install.ps1 -access_token $token -msi_path $collector_msi_path -with_fluentd $false -ingest_url "http://192.0.2.1:12345" -trace_url "http://192.0.2.1:12345" -network_interface "0.0.0.0"
ENV ACCESS_TOKEN_TMP=
RUN `
Set-ItemProperty -force -path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' -name 'SPLUNK_CONFIG' -value 'C:\setup\pipeline-collector.yaml'
Expand Down

0 comments on commit f437cde

Please sign in to comment.