Skip to content

fix(tests): update Splunk TA integration test for UCC-based TA#19488

Draft
Stringy wants to merge 1 commit intomasterfrom
giles/enable-splunk-ta-tests
Draft

fix(tests): update Splunk TA integration test for UCC-based TA#19488
Stringy wants to merge 1 commit intomasterfrom
giles/enable-splunk-ta-tests

Conversation

@Stringy
Copy link
Contributor

@Stringy Stringy commented Mar 18, 2026

Description

The Splunk TA was migrated from Add-on Builder to UCC framework but the integration test was never updated. The test was silently broken in CI because postToSplunk never checked HTTP response status.

  • Upgrade Splunk image from 9.0.5 (EOL, Python 3.7) to 9.4.6 (Python 3.9) to support modern TA dependencies (typing_extensions 4.13+)
  • Replace stale .spl artifact with TA-stackrox-2.0.5.spl built from current UCC-based source
  • Fix input creation: use UCC REST handler path (TA_stackrox_stackrox_violations) and add required index parameter
  • Fix saved search name: use unencoded spaces instead of %20 to avoid REST Assured double-encoding
  • Fix CIM field expectations: user and dest produce "unknown" (not null) when source fields are absent
  • Add HTTP status assertions to postToSplunk, createSearch, and getSearchResults to catch silent failures
  • Remove redundant sleep(15) from search retry loops

User-facing documentation

Testing and quality

  • the change is production ready: the change is GA, or otherwise the functionality is gated by a feature flag
  • CI results are inspected

Automated testing

  • added unit tests
  • added e2e tests
  • added regression tests
  • added compatibility tests
  • modified existing tests

How I validated my change

change me!

The Splunk TA was migrated from Add-on Builder to UCC framework but the
integration test was never updated. The test was silently broken in CI
because postToSplunk never checked HTTP response status.

- Upgrade Splunk image from 9.0.5 (EOL, Python 3.7) to 9.4.6 (Python 3.9)
  to support modern TA dependencies (typing_extensions 4.13+)
- Replace stale .spl artifact with TA-stackrox-2.0.5.spl built from
  current UCC-based source
- Fix input creation: use UCC REST handler path
  (TA_stackrox_stackrox_violations) and add required index parameter
- Fix saved search name: use unencoded spaces instead of %20 to avoid
  REST Assured double-encoding
- Fix CIM field expectations: user and dest produce "unknown" (not null)
  when source fields are absent
- Add HTTP status assertions to postToSplunk, createSearch, and
  getSearchResults to catch silent failures
- Remove redundant sleep(15) from search retry loops

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@openshift-ci
Copy link

openshift-ci bot commented Mar 18, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@rhacs-bot
Copy link
Contributor

Images are ready for the commit at 775d656.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.11.x-368-g775d6567ee.

@codecov
Copy link

codecov bot commented Mar 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.27%. Comparing base (74007e8) to head (775d656).
⚠️ Report is 7 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #19488   +/-   ##
=======================================
  Coverage   49.26%   49.27%           
=======================================
  Files        2725     2726    +1     
  Lines      205600   205626   +26     
=======================================
+ Hits       101286   101314   +28     
+ Misses      96777    96775    -2     
  Partials     7537     7537           
Flag Coverage Δ
go-unit-tests 49.27% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants