Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat(decl/resources): introduce test resource concept and clientServer resource #232

Merged
merged 4 commits into from
Oct 25, 2024

Conversation

ekoops
Copy link
Contributor

@ekoops ekoops commented Oct 24, 2024

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 introduces the concept of test resource and the clientServer test resource.

A test resource abstracts a resource the user wants to use in a test, hiding the implementation details and letting the user focus only on the action that will trigger the Falco rule.

The clientServer test resource sets up a client and a server, and enables their communication by tuning the underlying network infrastructure. The user can specify udp4, udp6, tcp4, tcp6 or unix as transport protocol. For connection-oriented transport protocols, the client is automatically connected to the server. The resource enables field binding to both client and server information.

The PR also removes a print statement in the socket system call test step.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

ekoops and others added 4 commits October 24, 2024 14:35
Signed-off-by: Leonardo Di Giovanna <[email protected]>
Co-authored-by: Aldo Lacuku <[email protected]>
Signed-off-by: Leonardo Di Giovanna <[email protected]>
Co-authored-by: Aldo Lacuku <[email protected]>
Signed-off-by: Leonardo Di Giovanna <[email protected]>
Co-authored-by: Aldo Lacuku <[email protected]>
Copy link
Contributor

@FedeDP FedeDP left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!
/approve

@poiana
Copy link

poiana commented Oct 25, 2024

[APPROVALNOTIFIER] This PR is APPROVED

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

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
Copy link

poiana commented Oct 25, 2024

LGTM label has been added.

Git tree hash: 852acc82fa53d62747ab4d1503793bea8350ec12

@poiana poiana merged commit cc14357 into falcosecurity:declarative-testing Oct 25, 2024
5 of 6 checks passed
@ekoops ekoops deleted the ekoops/resources branch October 25, 2024 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants