Skip to content
Draft

Test ci #2828

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
1086bb0
test: (ADDON-81912) add docker and podman e2e tests (#2822)
pdudhaiya-crest Nov 5, 2025
4695721
chore: add no cache for docker as well
pdudhaiya-crest Nov 6, 2025
8cfef83
chore: fix name cache tests
pdudhaiya-crest Nov 12, 2025
429dee2
Update ci-main.yaml
pdudhaiya-crest Nov 20, 2025
ab99121
Update conftest.py
pdudhaiya-crest Nov 20, 2025
7f35d27
Update docker_sc4s.service
pdudhaiya-crest Nov 20, 2025
6ba2a72
Update ci-main.yaml
pdudhaiya-crest Nov 20, 2025
2f053a2
Update ci-main.yaml
pdudhaiya-crest Nov 20, 2025
398ffda
Update ci-main.yaml
pdudhaiya-crest Nov 20, 2025
e0c3c62
Update test_name_cache.py
pdudhaiya-crest Nov 20, 2025
a6d4d02
Update test_name_cache.py
pdudhaiya-crest Nov 20, 2025
fbc8f09
Update ci-main.yaml
pdudhaiya-crest Nov 20, 2025
569d46b
Update ci-main.yaml
pdudhaiya-crest Nov 20, 2025
d002270
Update test_name_cache.py
pdudhaiya-crest Nov 20, 2025
d6e8487
Update test_name_cache.py
pdudhaiya-crest Nov 20, 2025
2a260c0
Update docker_sc4s.service
pdudhaiya-crest Nov 20, 2025
13717c2
Update ci-main.yaml
pdudhaiya-crest Nov 20, 2025
db9bc4f
Update ci-main.yaml
pdudhaiya-crest Nov 20, 2025
06b381e
Update test_name_cache.py
pdudhaiya-crest Nov 20, 2025
ee3cd91
Update test_name_cache.py
pdudhaiya-crest Nov 20, 2025
c67ba40
Update docker_sc4s.service
pdudhaiya-crest Nov 20, 2025
ed884ec
Update test_name_cache.py
pdudhaiya-crest Nov 20, 2025
39399e0
Update splunkutils.py
pdudhaiya-crest Nov 20, 2025
9d2e58e
Update test_name_cache.py
pdudhaiya-crest Nov 20, 2025
7b48eb2
Update test_name_cache.py
pdudhaiya-crest Nov 20, 2025
dbfe00e
Update docker_sc4s.service
pdudhaiya-crest Nov 20, 2025
4fd6b7c
Update test_name_cache.py
pdudhaiya-crest Nov 21, 2025
b4af89d
Update test_name_cache.py
pdudhaiya-crest Nov 21, 2025
4b0d6ec
Update ci-main.yaml
pdudhaiya-crest Nov 21, 2025
e301b42
Update ci-main.yaml
pdudhaiya-crest Nov 21, 2025
6612323
Update ci-main.yaml
pdudhaiya-crest Nov 21, 2025
e260b8c
Update ci-main.yaml
pdudhaiya-crest Nov 21, 2025
6da3983
Update ci-main.yaml
pdudhaiya-crest Nov 21, 2025
f7490ff
Update ci-main.yaml
pdudhaiya-crest Nov 21, 2025
9d2e132
Update test_name_cache.py
pdudhaiya-crest Nov 21, 2025
1161378
Update test_name_cache.py
pdudhaiya-crest Nov 21, 2025
32a4c45
Update docker_sc4s.service
pdudhaiya-crest Nov 21, 2025
97cbf69
Update ci-main.yaml
pdudhaiya-crest Nov 21, 2025
a0d1dce
Update ci-main.yaml
pdudhaiya-crest Nov 21, 2025
d995bae
Update docker_sc4s.service
pdudhaiya-crest Nov 21, 2025
e959b58
Update ci-main.yaml
pdudhaiya-crest Nov 21, 2025
e39d2b2
Update test_name_cache.py
pdudhaiya-crest Nov 21, 2025
0326993
Update ci-main.yaml
pdudhaiya-crest Nov 24, 2025
e4348bf
Update ci-main.yaml
pdudhaiya-crest Nov 24, 2025
238e4db
Update ci-main.yaml
pdudhaiya-crest Nov 24, 2025
742b813
Update ci-main.yaml
pdudhaiya-crest Nov 24, 2025
909d269
Update test_name_cache.py
pdudhaiya-crest Nov 24, 2025
f73c8c0
Update ci-main.yaml
pdudhaiya-crest Nov 24, 2025
8998296
Update docker_sc4s.service
pdudhaiya-crest Nov 24, 2025
2a10e2a
Update ci-lite.yaml
pdudhaiya-crest Nov 24, 2025
e1bf271
Update ci-main.yaml
pdudhaiya-crest Nov 25, 2025
f5a0a6f
update
pdudhaiya-crest Nov 25, 2025
53bc8d1
Update ci-main.yaml
pdudhaiya-crest Nov 25, 2025
161800b
Update ci-main.yaml
pdudhaiya-crest Nov 25, 2025
32bf6b9
Update ci-main.yaml
pdudhaiya-crest Nov 25, 2025
172499b
Update ci-main.yaml
pdudhaiya-crest Nov 25, 2025
59a5a93
Update test_checkpoint.py
pdudhaiya-crest Nov 25, 2025
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
167 changes: 85 additions & 82 deletions .github/workflows/ci-enterprise.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,15 @@ jobs:
scanners: "vuln"

test-container:
strategy:
matrix:
deployment_type: ["docker", "podman"]
runs-on: ubuntu-latest
continue-on-error: true
needs:
- meta
- build_action
container:
image: python:3.9-buster

services:
splunk:
image: splunk/splunk:${{ fromJson(needs.meta.outputs.matrix_supportedSplunk)[0].version }}
Expand All @@ -202,41 +205,68 @@ jobs:
SPLUNK_PASSWORD: Changed@11
SPLUNK_START_ARGS: --accept-license
SPLUNK_APPS_URL: https://github.com/splunk/splunk-configurations-base-indexes/releases/download/v1.0.0/splunk_configurations_base_indexes-1.0.0.tar.gz
sc4s:
image: ${{ needs.meta.outputs.container_base }}
ports:
- 514:514
- 601:601
- 5614:5514
- 5601:5601
- 6000:6000
- 6002:6002
- 9000:9000
env:
SC4S_DEST_SPLUNK_HEC_DEFAULT_URL: https://splunk:8088
SC4S_DEST_SPLUNK_HEC_DEFAULT_TOKEN: 70b6ae71-76b3-4c38-9597-0c5b37ad9630
SC4S_DEST_SPLUNK_HEC_DEFAULT_TLS_VERIFY: "no"
SC4S_DEST_SPLUNK_HEC_DEFAULT_HTTP_COMPRESSION: "yes"
SC4S_LISTEN_PFSENSE_FIREWALL_TCP_PORT: 6000
SC4S_LISTEN_SIMPLE_TEST_ONE_TCP_PORT: 5514
SC4S_LISTEN_SIMPLE_TEST_ONE_UDP_PORT: 5514
SC4S_LISTEN_SIMPLE_TEST_TWO_TCP_PORT: 5601
SC4S_LISTEN_SPECTRACOM_NTP_TCP_PORT: 6002
SC4S_LISTEN_CISCO_ESA_TCP_PORT: 9000
SC4S_LISTEN_RARITAN_DSX_TCP_PORT: 9001
SC4S_LISTEN_CHECKPOINT_SPLUNK_NOISE_CONTROL: "yes"
SC4S_SOURCE_RICOH_SYSLOG_FIXHOST: "yes"
TEST_SC4S_ACTIVATE_EXAMPLES: "yes"
SC4S_DEBUG_CONTAINER: "yes"
SC4S_SOURCE_VMWARE_VSPHERE_GROUPMSG: "yes"
SC4S_NETAPP_ONTAP_NEW_FORMAT: "yes"
SC4S_USE_VPS_CACHE: "yes"

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: false
persist-credentials: false
- name: Install Ansible and other dependencies as python package
run: |
pip install ansible~=6.1.0 --no-cache-dir \
&& pip install pywinrm>=0.4.2 --no-cache-dir \
&& pip install ansible-lint>=6.0.0 --no-cache-dir \
&& pip install docker --no-cache-dir
- name: Configure Ansible Environment Variables
env:
ANSIBLE_CONFIG: ansible.cfg
ANSIBLE_HOST_KEY_CHECKING: False
run: |
echo "ANSIBLE_CONFIG is set to: $ANSIBLE_CONFIG"
echo "ANSIBLE_HOST_KEY_CHECKING is set to: $ANSIBLE_HOST_KEY_CHECKING"
sudo systemctl set-environment SC4S_IMAGE=${{ needs.meta.outputs.container_base }}
- name: Update inventory file
run: |
cat << EOF > ansible/inventory/inventory.yaml
---
all:
hosts:
children:
node:
hosts:
node_1:
ansible_host: 127.0.0.1
ansible_connection: local
ansible_user: root
- name: Update env_file
run: |
echo "Updating ansible/inventory/inventory.yaml"
cat << EOF > ansible/resources/env_file
SC4S_DEST_SPLUNK_HEC_DEFAULT_URL=https://127.0.0.1:8088
SC4S_DEST_SPLUNK_HEC_DEFAULT_TOKEN=70b6ae71-76b3-4c38-9597-0c5b37ad9630
SC4S_DEST_SPLUNK_HEC_DEFAULT_TLS_VERIFY=no
SC4S_DEST_SPLUNK_HEC_DEFAULT_HTTP_COMPRESSION=yes
SC4S_LISTEN_PFSENSE_FIREWALL_TCP_PORT=6000
SC4S_LISTEN_SIMPLE_TEST_ONE_TCP_PORT=5514
SC4S_LISTEN_SIMPLE_TEST_ONE_UDP_PORT=5514
SC4S_LISTEN_SIMPLE_TEST_TWO_TCP_PORT=5601
SC4S_LISTEN_SPECTRACOM_NTP_TCP_PORT=6002
SC4S_LISTEN_CISCO_ESA_TCP_PORT=9000
SC4S_LISTEN_RARITAN_DSX_TCP_PORT=9001
SC4S_LISTEN_CHECKPOINT_SPLUNK_NOISE_CONTROL=yes
SC4S_SOURCE_RICOH_SYSLOG_FIXHOST=yes
TEST_SC4S_ACTIVATE_EXAMPLES=yes
SC4S_DEBUG_CONTAINER=yes
SC4S_SOURCE_VMWARE_VSPHERE_GROUPMSG=yes
SC4S_NETAPP_ONTAP_NEW_FORMAT=yes
SC4S_USE_VPS_CACHE=yes
- name: Update current SC4S image in unit file
run: |
sed -i 's|Environment="SC4S_IMAGE=ghcr.io/splunk/splunk-connect-for-syslog/container3:latest"|Environment="SC4S_IMAGE=${{ needs.meta.outputs.container_base }}"|' ansible/resources/${{ matrix.deployment_type }}_sc4s.service
- name: Run Ansible Playbook
run: |
ansible-playbook --connection=local -i ansible/inventory/inventory.yaml ansible/playbooks/${{ matrix.deployment_type }}.yml
- name: Run tests
run: |
pip3 install poetry
Expand All @@ -245,63 +275,28 @@ jobs:
poetry run pytest -v --tb=long \
--splunk_type=external \
--splunk_hec_token=70b6ae71-76b3-4c38-9597-0c5b37ad9630 \
--splunk_host=splunk \
--sc4s_host=sc4s \
--splunk_host=127.0.0.1 \
--sc4s_host=127.0.0.1 \
--junitxml=test-results/test.xml \
-n 14 \
-k 'not lite and not name_cache'
test-ipv4-name-cache:
runs-on: ubuntu-latest
needs:
- meta
- build_action
container:
image: python:3.9-buster
services:
splunk:
image: splunk/splunk:${{ fromJson(needs.meta.outputs.matrix_supportedSplunk)[0].version }}
ports:
- 8088:8088
- 8089:8089
env:
SPLUNK_HEC_TOKEN: 70b6ae71-76b3-4c38-9597-0c5b37ad9630
SPLUNK_PASSWORD: Changed@11
SPLUNK_START_ARGS: --accept-license
SPLUNK_APPS_URL: https://github.com/splunk/splunk-configurations-base-indexes/releases/download/v1.0.0/splunk_configurations_base_indexes-1.0.0.tar.gz
sc4s:
image: ${{ needs.meta.outputs.container_base }}
ports:
- 514:514
env:
SC4S_DEST_SPLUNK_HEC_DEFAULT_URL: https://splunk:8088
SC4S_DEST_SPLUNK_HEC_DEFAULT_TOKEN: 70b6ae71-76b3-4c38-9597-0c5b37ad9630
SC4S_DEST_SPLUNK_HEC_DEFAULT_TLS_VERIFY: "no"
SC4S_USE_NAME_CACHE: "yes"
SC4S_CLEAR_NAME_CACHE: "yes"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: artifact-test-results
uses: actions/upload-artifact@v4
with:
submodules: false
persist-credentials: false
- name: Run tests
run: |
pip3 install poetry
poetry install
mkdir -p test-results || true
poetry run pytest -v --tb=long \
--splunk_type=external \
--splunk_hec_token=70b6ae71-76b3-4c38-9597-0c5b37ad9630 \
--splunk_host=splunk \
--sc4s_host=sc4s \
--junitxml=test-results/test.xml \
-n 1 \
-m 'name_cache'
test-ipv6-name-cache:
name: test-container-results_${{ matrix.deployment_type }}.xml
path: test-results/test.xml
if: ${{ !cancelled() }}

test-name-cache:
strategy:
matrix:
SC4S_IPV6_ENABLE: ["yes","no"]
runs-on: ubuntu-latest
needs:
- meta
- build_action
# runs all of the steps inside the specified container rather than on the VM host.
# Because of this the network configuration changes from host based network to a container network.
container:
image: python:3.9-buster
services:
Expand All @@ -315,6 +310,7 @@ jobs:
SPLUNK_PASSWORD: Changed@11
SPLUNK_START_ARGS: --accept-license
SPLUNK_APPS_URL: https://github.com/splunk/splunk-configurations-base-indexes/releases/download/v1.0.0/splunk_configurations_base_indexes-1.0.0.tar.gz

sc4s:
image: ${{ needs.meta.outputs.container_base }}
ports:
Expand All @@ -325,7 +321,8 @@ jobs:
SC4S_DEST_SPLUNK_HEC_DEFAULT_TLS_VERIFY: "no"
SC4S_USE_NAME_CACHE: "yes"
SC4S_CLEAR_NAME_CACHE: "yes"
SC4S_IPV6_ENABLE: "yes"
SC4S_IPV6_ENABLE: "${{ matrix.SC4S_IPV6_ENABLE }}"

steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -345,14 +342,20 @@ jobs:
--junitxml=test-results/test.xml \
-n 1 \
-m 'name_cache'
- name: artifact-test-results
uses: actions/upload-artifact@v4
with:
name: test-name-cache-results_IPv6_${{ matrix.SC4S_IPV6_ENABLE }}.xml
path: test-results/test.xml
if: ${{ !cancelled() }}
release:
name: Release
runs-on: ubuntu-latest
needs:
- meta
- build_action
- test-container
- test-ipv4-name-cache
- test-name-cache
steps:
- uses: actions/checkout@v4
with:
Expand Down
Loading
Loading