gardener / gardener-extension-shoot-rsyslog-relp

Other
0 stars 15 forks source link

Improve testmachinery tests and add checks for forwarding of audit logs #127

Closed plkokanov closed 4 months ago

plkokanov commented 5 months ago

How to categorize this PR?

/area testing /kind enhancement

What this PR does / why we need it: This PR tries to improve mainly the testmachinery tests by reducing the exec calls that were previously performed - instead of using a separate exec to generating each log line, now one exec will be used to generate all logs.

Additionally, forwarding of audit logs is now also checked. If instructed to, the test will create a file under the /etc directory. As per the audit rules this should generate an audit event of the file creation. The audit event contains the name of the file and the operation that created it. During the verification we look for the name of the file in the log lines retrieved from the echo server.

Which issue(s) this PR fixes: Fixes #

Special notes for your reviewer:

Release note:

NONE
gardener-prow[bot] commented 4 months ago

LGTM label has been added.

Git tree hash: 4a2f8aa7e0580b3e1b29e493f1d0f75f0eafb56e

plkokanov commented 4 months ago

/approve

gardener-prow[bot] commented 4 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ialidzhikov, plkokanov

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/gardener/gardener-extension-shoot-rsyslog-relp/blob/main/OWNERS)~~ [plkokanov] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment