Skip to content

Commit

Permalink
fix:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa…
Browse files Browse the repository at this point in the history
…aaaaaaaaaaaaaaaaaa [run-int-tests]

Signed-off-by: Ilya Kheifets <ikheifets@splunk.com>
  • Loading branch information
ikheifets-splunk committed Sep 12, 2024
1 parent 13d1e47 commit c4ad201
Showing 4 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-main.yaml
Original file line number Diff line number Diff line change
@@ -148,7 +148,7 @@ jobs:
- name: run tests
working-directory: integration_tests
run: |
poetry run pytest --splunk_host="localhost" --splunk_password="changeme2" --trap_external_ip="$(hostname -I | cut -d " " -f1)" --sc4snmp_deployment="microk8s"
poetry run pytest --splunk_host="localhost" --splunk_password="changeme2" --trap_external_ip="$(hostname -I | cut -d " " -f1)" --sc4snmp_deployment="microk8s" -k "trap"
test-integration-compose:
name: Run integration tests in docker compose deployment
@@ -181,4 +181,4 @@ jobs:
- name: run tests
working-directory: integration_tests
run: |
poetry run pytest --splunk_host="localhost" --splunk_password="changeme2" --trap_external_ip="$(hostname -I | cut -d " " -f1)" --sc4snmp_deployment="docker-compose"
poetry run pytest --splunk_host="localhost" --splunk_password="changeme2" --trap_external_ip="$(hostname -I | cut -d " " -f1)" --sc4snmp_deployment="docker-compose" -k "trap"
2 changes: 1 addition & 1 deletion integration_tests/automatic_setup_compose.sh
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@ deploy_poetry() {
poetry install
poetry add --group dev splunk-sdk
poetry add --group dev splunklib
poetry add --group dev pysnmp
poetry add --group dev pysnmplib
}

wait_for_containers_to_be_up() {
2 changes: 1 addition & 1 deletion integration_tests/automatic_setup_microk8s.sh
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@ deploy_poetry() {
poetry install
poetry add --group dev splunk-sdk
poetry add --group dev splunklib
poetry add --group dev pysnmp
poetry add --group dev pysnmplib
}

wait_for_pod_initialization() {
6 changes: 6 additions & 0 deletions integration_tests/test_trap_integration.py
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@
import time

from pysnmp.hlapi import *
import pysnmp

from integration_tests.splunk_test_utils import (
create_v3_secrets_compose,
@@ -34,6 +35,11 @@


def send_trap(host, port, object_identity, mib_to_load, *var_binds):
try:
UdpTransportTarget((host, port)),
except Exception:
raise Exception(pysnmp.__version__)

iterator = sendNotification(
SnmpEngine(),
CommunityData("public", mpModel=0),

0 comments on commit c4ad201

Please sign in to comment.