8 Commits

Author SHA1 Message Date
Rainer Gerhards
1ae665bd43
CI: run real Elasticsearch instance in github action (#6216)
* ci/tests: add Elasticsearch 8 workflow

- allow the testbench to honour RSYSLOG_TESTBENCH_EXTERNAL_ES_URL 
  so externally managed Elasticsearch services can be reused without local 
   start/stop logic
- provision Elasticsearch 8 via GitHub Actions and run the omelasticsearch 
   suite inside the development container

With the help of AI-Agent: ChatGPT
2025-10-04 17:05:16 +02:00
Rainer Gerhards
5bb8eb9179
omelasticsearch: omit _type by default; use typeless endpoint
Newer Elasticsearch versions reject typed APIs. This adapts the module
so shipping works out of the box with modern clusters and keeps the
codebase aligned with typeless ES conventions.

Impact: bulk metadata no longer includes _type unless explicitly set.
Old setups that relied on a default "events" type (ES < 8) may need
explicit configuration.

Technically, the default searchType is now NULL
(OMES_SEARCHTYPE_DEFAULT). setPostURL continues to route requests to
the typeless /_doc endpoint, but bulk metadata is generated without a
_type field when searchType is unset. The legacy default "events" for
ES < 8 is removed. Tests are updated to stop passing searchType, and
the searchType-empty test is dropped to reflect the new default. No
OMODTX or action-queue semantics change.

Closes: https://github.com/rsyslog/rsyslog/issues/5060
2025-09-25 11:56:32 +02:00
Rainer Gerhards
cd26aecaf9
tests/omelasticsearch: align suite with ES 7.14, reduce flakiness
Non-technical: test flakiness makes it hard to validate unrelated changes.
This aligns omelasticsearch tests with ES 7.14 defaults to get the
testbench back to a deterministic state and pave the way for further
modernization.

Impact: test behavior changes; one test skipped; CI coverage slightly reduced.

Before: tests mixed ES 6-era types and ad-hoc tarball picks; deprecation
checks intermittently failed and retries were brittle. After: tests use the
7.14.1 tarball via diag.sh default, typeless mappings, and `_doc` type in
omelasticsearch actions; known-flaky bulk-retry test is skipped for now.

Technical details:
- Add `searchType="_doc"` to all omelasticsearch actions and update index
  provisioning to typeless mappings compatible with ES 7.14.
- Remove script-level `ES_DOWNLOAD` overrides to follow diag.sh's 7.14.1
  default, keeping test scripts and helper defaults in sync.
- Drop deprecation-log assertion in `es-searchType-empty.sh` to prevent
  spurious failures specific to ES 6-era types.
- Temporarily skip `es-bulk-retry.sh` (exit 77) pending a rewrite of retry
  semantics under ES 7.x.
- CI: export `VERBOSE=1`; disable Kafka and Elasticsearch tests in the
  affected matrix job to keep CI green while ES/Kafka suites are refactored.
  VERBOSE ensures test logs are emitted to stderr and as such are
  visible in CI test runs.
- Minor whitespace/indent cleanups; no runtime code or plugin behavior
  changes.
2025-09-21 14:09:09 +02:00
Rainer Gerhards
a1b6097e0d
testbench: fix "typo" in test case
executed more code than intended
2023-11-10 12:50:30 +01:00
Rainer Gerhards
3860122f41
testbench: improve speed of elasticsearch tests
we avoid unnecessary ElasticSearch restarts now. This also helps with flakes
on slow CI machines.
2020-01-01 12:23:50 +01:00
Rainer Gerhards
e91917647f
testbench: make tests more robust against races 2018-11-30 18:54:07 +01:00
Rainer Gerhards
012d18a2de
testbench: harden some tests against races
also improve test code while we were at it...
2018-11-30 15:00:26 +01:00
PascalWithopf
5c97f8ff10 testbench: add test for execOnlyWhenPreviousSuspended
Test for action parameter execOnlyWhenPreviousSuspended
in combination with an omelasticsearch action.

See https://github.com/rsyslog/rsyslog/issues/1110
2018-11-21 08:46:52 +01:00