Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
escape
  • Loading branch information
efd6 committed Oct 27, 2025
commit 460341d69497eca562a6e483226095d37a05c4a7
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ stack_up 8.19.3
! stderr .
stdout 'Local package-registry will serve packages from these sources'

# Unfortunately due to constraints imposed by elastic-package, the path to
# the pipeline cannot be within this file. This is due to the use of links
# filesystems.

# Install the data stream's pipeline.
install_pipelines ${DATA_STREAM_ROOT}
! stderr .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ use_stack -profile ${CONFIG_PROFILES}/default
! stderr .
cmpenv stdout want_use.json

# Unfortunately due to constraints imposed by elastic-package, the path to
# the pipeline cannot be within this file. This is due to the use of links
# filesystems.

# Install the data stream's pipeline.
install_pipelines -profile ${CONFIG_PROFILES}/default ${DATA_STREAM_ROOT}
! stderr .
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
[!external_stack] skip 'Skipping external stack test.'

date START

# Register stack and check that we get the expected output.
use_stack -profile ${CONFIG_PROFILES}/default
! stderr .
cmpenv stdout want_use.json

# Install the data stream's pipeline.
install_pipelines -profile ${CONFIG_PROFILES}/default ${WORK}
! stderr .
stdout '^installed pipelines in .* with nonce'

# Run a simulation with the data.
simulate -profile ${CONFIG_PROFILES}/default ${WORK} default data.json
! stderr .
cmp stdout want.json

# Uninstall pipelines.
uninstall_pipelines -profile ${CONFIG_PROFILES}/default ${WORK}
! stderr .
stdout '^uninstalled pipelines in'

# Put logs in the work directory check for existence.
dump_logs -profile ${CONFIG_PROFILES}/default -since ${START}
exists ${WORK}/logs/elastic-agent.log
exists ${WORK}/logs/elasticsearch.log
exists ${WORK}/logs/fleet-server.log
exists ${WORK}/logs/kibana.log
exists ${WORK}/logs/package-registry.log

# Then attempt to take it down again.
! stack_down -profile ${CONFIG_PROFILES}/default
! stdout .
stderr '^cannot take down externally run stack '${CONFIG_PROFILES}'/default$'

-- want_use.json --
{
"provider": "compose",
"elasticsearch_host": "https://127.0.0.1:9200",
"elasticsearch_username": "elastic",
"elasticsearch_password": "changeme",
"kibana_host": "https://127.0.0.1:5601",
"ca_cert_file": "${CONFIG_PROFILES}/default/certs/ca-cert.pem"
}
-- data.json --
{
"message": "World!"
}
{
"message": "from testscript"
}
-- elasticsearch/ingest_pipeline/default.yml --
---
description: Test pipeline.
processors:
- set:
field: hello
value: '{{{message}}}'
ignore_empty_value: true
- rename:
field: message
target_field: event.original
ignore_missing: true
on_failure:
- set:
field: error.message
value: '{{{ _ingest.on_failure_message }}}'
-- want.json --
{
"event": {
"original": "World!"
},
"hello": "World!"
}
{
"event": {
"original": "from testscript"
},
"hello": "from testscript"
}