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

Create a single backend acceptance test suite. #1597

Merged
merged 2 commits into from Dec 22, 2023

Conversation

jeffmendoza
Copy link
Collaborator

A new integration test suite is added under internal/testing/backend to test all backends with the same set of tests. All the test scaffolding is seutp to run all the backends. Only "CertifyBad" tests have been copied in in this first commit.

Arango, keyvalue, and ent tests are all close copies of each other. A large amount of work in implementing API changes is updating the tests for each backend. Also, we wish to have a gold standard test suite so that new backends can be tested to the same standards as the existing ones. This code supports adding new backends piecemeal and skipping tests on unimplemented node types.

I've only put CertifyBad here now, so all the setup can be reviewed before I move all the types over. The plan is to remove all the integration tests from arango, keyvalue, and ent, and just use these.

PR Checklist

  • All commits have a Developer Certificate of Origin (DCO) -- they are generated using -s flag to git commit.
  • All new changes are covered by tests
  • If GraphQL schema is changed, make generate has been run
  • If collectsub protobuf has been changed, make proto has been run
  • All CI checks are passing (tests and formatting)
  • All dependent PRs have already been merged

A new integration test suite is added under internal/testing/backend to test
all backends with the same set of tests. All the test scaffolding is seutp to
run all the backends. Only "CertifyBad" tests have been copied in in this
first commit.

Signed-off-by: Jeff Mendoza <jlm@jlm.name>
Copy link
Collaborator

@mihaimaruseac mihaimaruseac left a comment

Choose a reason for hiding this comment

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

This is what I wanted for the backend testing, thank you for it!

Looking good on a quick skim, but I'll do a deeper review later (OOO until Jan)

Copy link
Collaborator

@pxp928 pxp928 left a comment

Choose a reason for hiding this comment

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

This is so much better!

Copy link
Collaborator

@mrizzi mrizzi left a comment

Choose a reason for hiding this comment

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

I agree, this is a much better, consistent and stable approach.

Copy link
Collaborator

@mihaimaruseac mihaimaruseac left a comment

Choose a reason for hiding this comment

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

LGTM with a minor nit (typo). Thank you very much for this, I really like it!

internal/testing/backend/README.md Outdated Show resolved Hide resolved
Signed-off-by: Mihai Maruseac <mihai.maruseac@gmail.com>
Signed-off-by: Mihai Maruseac <mihaimaruseac@google.com>
@kodiakhq kodiakhq bot merged commit c5d84b6 into guacsec:main Dec 22, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants