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

Add integration test for Batchx509SVID RPC #5402

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

valverdethiago
Copy link

Pull Request check list

  • Commit conforms to CONTRIBUTING.md?
  • Proper tests/regressions included?
  • Documentation updated?

Provides a way to verify the operation of Batchx509SVID RPC.

Description of change
This PR introduces an automated integration test for the Batchx509SVID RPC in Open Source SPIRE. The new test script ensures the continuous operation of this RPC by verifying its functionality in a controlled environment. This enhancement addresses the previously identified gap in automated testing, thereby improving the reliability and stability of the SPIRE project by ensuring that the Batchx509SVID RPC performs as expected over time.

Which issue this PR fixes
Fixes 5401

@valverdethiago valverdethiago force-pushed the integration-test-for-Batchx509SVID-RPC branch from ebe3772 to 1d27256 Compare August 18, 2024 22:56
@amartinezfayo amartinezfayo self-assigned this Aug 20, 2024
@valverdethiago valverdethiago force-pushed the integration-test-for-Batchx509SVID-RPC branch from 56cd285 to ce239f3 Compare August 22, 2024 02:17
else
echo "Entry with SPIFFE ID ${SPIFFE_ID} exists."
fi
done
Copy link
Member

@amoore877 amoore877 Aug 22, 2024

Choose a reason for hiding this comment

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

this step as-is verifies that the entries exist, as created in the prior step.

however, neither this suite nor this step test the BatchNewX509SVID API

Copy link
Author

Choose a reason for hiding this comment

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

As I talked with @zmt the batch API is called internally when we add a single entry or create a batch operation as the test is already doing. The check for the existence of the entry fullfils the purpose of the task case if they were created in a batch operation and actually exist the operation is working as expected, right?

Copy link
Member

@amoore877 amoore877 Aug 26, 2024

Choose a reason for hiding this comment

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

what I believe you're detailing is Batch Entry Create, not Batch X509 SVID.

if the former, then the test needs to be re-named and the README updated

if the intention is to cover the latter, then comment still stands- this test as-is is not covering either explicit usage of that API or implicit usage by the running agent (which https://github.com/spiffe/spire/blob/main/test/integration/suites/fetch-x509-svids/05-fetch-x509-svids may already be doing)

valverdethiago and others added 2 commits August 25, 2024 19:35
Co-authored-by: amoore877 <11066940+amoore877@users.noreply.github.com>
Signed-off-by: Thiago Valverde de Souza <valverde.thiago@gmail.com>
@amoore877 amoore877 marked this pull request as draft September 4, 2024 20:54
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.

4 participants