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

YML-based test automation #24

Open
christophwille opened this issue Nov 3, 2021 · 4 comments
Open

YML-based test automation #24

christophwille opened this issue Nov 3, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@christophwille
Copy link
Owner

Triggered by #3 (comment)

The inner-loop tests should definitely remain in the current unit test project. However, supporting running build verification tests using eg https://github.com/open-policy-agent/opa/tree/main/test/cases/testdata is definitely desireable.

Maybe wrap this in a separate test project so they are split from the inner loop tests. How to include the tests is the 1m question... copy is a no-no, on the other hand I don't want to drag in submodules "just" for this. Ideas welcome.

@christophwille christophwille added the enhancement New feature or request label Nov 3, 2021
@christophwille
Copy link
Owner Author

To pick on a specific example: iinuwa@a73dbc7

The C#-implemented SDK builtins should be tested directly from a C# unit test, not indirectly via rego (I would consider the latter an "integration test").

@christophwille
Copy link
Owner Author

@iinuwa
Copy link

iinuwa commented Nov 4, 2021

How to include the tests is the 1m question... copy is a no-no, on the other hand I don't want to drag in submodules "just" for this. Ideas welcome.

What do you mean by copying here? Do you mean you don't want files checked into the repo? If so, the npm-opa-sdk CI downloads the opa repo as a tar and then extracts the subdirectory while running the tests.

The C#-implemented SDK builtins should be tested directly from a C# unit test, not indirectly via rego (I would consider the latter an "integration test").

Agreed. Are you saying that you want the YAML-based tests to be unit or integration tests?

@christophwille
Copy link
Owner Author

Correct, I don't want the files in this repo - the build automation doing the downloading could be an option. And when I am talking about those "third party tests", I consider them "SDK validation tests" (in a sense we are reusing somebody else's unit tests)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants