Skip to content

Add integration test for journald#695

Open
Paamicky wants to merge 20 commits into
mainfrom
mcommey/journald-logs-support-test
Open

Add integration test for journald#695
Paamicky wants to merge 20 commits into
mainfrom
mcommey/journald-logs-support-test

Conversation

@Paamicky
Copy link
Copy Markdown
Contributor

@Paamicky Paamicky commented May 13, 2026

Description of the issue

Adds integration tests for the journald log collection feature. Tests validate that the journald pipeline correctly collects, filters, and delivers logs to CloudWatch.

Description of changes

  • Feature test (test/feature/linux/journald_logs/) - Consolidated test file with 4 test functions validating units, priority, matches, and regex filtering. Uses a single EC2 instance with all 4 collect_list entries. Validates that only matching entries appear in each CloudWatch log stream.
    • Log state test (test/log_state/journald/) — Tests cursor persistence across agent restarts to validate no missing logs
    • Basic validator — Added journald-specific fields (LogUnit, LogPriority, LogIdentifier) to LogValidation model. Updated ValidateLogs Journald case to validate unit, priority, and identifier fields.
    • Test case generator — Registered journald tests in ec2_linux and ec2_selinux sections with AL2/AL2023 targets.

License

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Tests

All Journald tests passes: https://github.com/aws/amazon-cloudwatch-agent/actions/runs/25865272301

@Paamicky Paamicky force-pushed the mcommey/journald-logs-support-test branch from d5feec4 to 710632d Compare May 13, 2026 16:16
@Paamicky Paamicky marked this pull request as ready for review May 13, 2026 16:27
@Paamicky Paamicky requested a review from a team as a code owner May 13, 2026 16:27
@Paamicky Paamicky requested review from TravisStark and okankoAMZ May 13, 2026 16:30
instanceType: "i7i.xlarge",
},
{
testDir: "./test/otel/standard",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should these be deleted?

@Paamicky Paamicky force-pushed the mcommey/journald-logs-support-test branch 2 times, most recently from e9737a8 to 90a5140 Compare May 14, 2026 17:29
@Paamicky Paamicky force-pushed the mcommey/journald-logs-support-test branch 3 times, most recently from e5df7c3 to 1e2bdc1 Compare May 20, 2026 19:59
@Paamicky Paamicky force-pushed the mcommey/journald-logs-support-test branch from 1e2bdc1 to 1bdcbbc Compare May 21, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants