Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat(decl): add test suites support and adapt logging #262

Merged
merged 4 commits into from
Jan 9, 2025

Conversation

ekoops
Copy link
Contributor

@ekoops ekoops commented Jan 9, 2025

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind documentation

/kind tests

/kind feature

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area commands

/area pkg

/area events

What this PR does / why we need it:

This PR adds support for test suites. A test suite is uniquely associated with a rule: all tests associated to a single rule belong to the same test suite. As declarative run and declarative test --skip-outcome-verification commands let the user omit the rule name, in this context, all tests omitting the rule name are associated to the same special test suite identified by the empty string "".

Moreover, the logging and the logging attributes propagation were improved (cleaned an augmented with additional info regarding tests source files and belonging suites).

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

@poiana poiana requested review from alacuku and FedeDP January 9, 2025 14:49
@poiana poiana added the size/XXL label Jan 9, 2025
@ekoops ekoops changed the title wIp: feat(decl): add test suites support and adapt logging feat(decl): add test suites support and adapt logging Jan 9, 2025
@ekoops ekoops force-pushed the ekoops/test-suites branch from 674efec to c0df0f6 Compare January 9, 2025 15:12
Copy link
Member

@alacuku alacuku left a comment

Choose a reason for hiding this comment

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

Thanks @ekoops for this PR.

I left some minor comments.

pkg/baggage/baggage.go Outdated Show resolved Hide resolved
pkg/test/runner/host/host.go Show resolved Hide resolved
pkg/test/suite/suite.go Outdated Show resolved Hide resolved
ekoops added 4 commits January 9, 2025 17:09
Signed-off-by: Leonardo Di Giovanna <leonardodigiovanna1@gmail.com>
Signed-off-by: Leonardo Di Giovanna <leonardodigiovanna1@gmail.com>
Replace labels with baggages of supported key-value pairs. Augment
the propagated info and use them in logs.

Signed-off-by: Leonardo Di Giovanna <leonardodigiovanna1@gmail.com>
Signed-off-by: Leonardo Di Giovanna <leonardodigiovanna1@gmail.com>
@ekoops ekoops force-pushed the ekoops/test-suites branch from c0df0f6 to 7584236 Compare January 9, 2025 16:12
Copy link
Member

@alacuku alacuku left a comment

Choose a reason for hiding this comment

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

/lgtm

@poiana
Copy link

poiana commented Jan 9, 2025

LGTM label has been added.

Git tree hash: 70308befa8718b80aa423516a018a8ed2dee1b0a

@poiana
Copy link

poiana commented Jan 9, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alacuku, ekoops

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:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana poiana added the approved label Jan 9, 2025
@poiana poiana merged commit d02deab into falcosecurity:declarative-testing Jan 9, 2025
4 of 6 checks passed
@ekoops ekoops deleted the ekoops/test-suites branch January 9, 2025 16:18
@leogr leogr added this to the v0.13.0 milestone Jan 17, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants