-
Notifications
You must be signed in to change notification settings - Fork 43
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
Adds integration tests for mysql, postgres and go client-server. #72
Conversation
Signed-off-by: JU4N98 <juanpablocabana2@gmail.com>
Signed-off-by: JU4N98 <juanpablocabana2@gmail.com>
Signed-off-by: JU4N98 <juanpablocabana2@gmail.com>
Thanks @FedeNQ for writing all these unit tests. |
it/docker-compose.yaml
Outdated
version: '3' | ||
services: | ||
spire-server: | ||
image: ghcr.io/spiffe/spire-server:1.6.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update to 1.7.0 for server and agent?
Can you move the tests form |
.github/workflows/pr_build.yaml
Outdated
- name: Run integration tests | ||
run: ./integration_test.sh | ||
shell: bash | ||
working-directory: ./it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think of using a test matrix here and calling each test individually? That way it will show what test is running in the Github Actions output.
This snippet from the helm-charts repo will step through the directory with all the tests and build the matrix. https://github.com/spiffe/helm-charts/blob/main/.github/workflows/helm-chart-ci.yaml#L114-L117
c43f7d3
to
58b4f66
Compare
Signed-off-by: FedeNQ <fedenahuel07@gmail.com>
Hi! Thanks for the review, we've made some changes based on the comments that you've provided.
In order to add the build-matrix we've created a bunch of scripts on .github/tests that call the required scripts with parameters, should we move ALL the scripts to .github/tests or is it correct as it is now? |
Hi @FedeNQ Thanks for making the requested changes.
Yes. Having the tests there would eliminate the need for those extra scripts and you could just call the tests directly. Also if you can add a Described here: https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs |
Thanks @FedeNQ . The test matrix changes look good. The restore-entry.test.sh is failing and change-entry-test.sh is getting cancelled. |
Thanks! |
* adds strategy Signed-off-by: FedeNQ <fedenahuel07@gmail.com> * changes bash command Signed-off-by: FedeNQ <fedenahuel07@gmail.com> --------- Signed-off-by: FedeNQ <fedenahuel07@gmail.com>
* Change location of test files Signed-off-by: FedeNQ <fedenahuel07@gmail.com> * Change location of restore-entry-test Signed-off-by: FedeNQ <fedenahuel07@gmail.com> * Change location of restore-entry-test Signed-off-by: FedeNQ <fedenahuel07@gmail.com> * Adds shell in Run tests Signed-off-by: FedeNQ <fedenahuel07@gmail.com> --------- Signed-off-by: FedeNQ <fedenahuel07@gmail.com>
Signed-off-by: FedeNQ <fedenahuel07@gmail.com>
Signed-off-by: FedeNQ <fedenahuel07@gmail.com>
Signed-off-by: FedeNQ <fedenahuel07@gmail.com>
Signed-off-by: FedeNQ <fedenahuel07@gmail.com>
0b79565
to
c4901bd
Compare
@faisal-memon It's seems like we had a false positive on some test, and a problem with the retries, but it should work now. |
Thanks @FedeNQ Can you move everything from it folder to .github/tests? That way you won't need those stub scripts. |
The scripts on test folder call the scripts on IT folder with parameters, that's why they are necessary, so move them to .github/tests won't solve the problem (it will avoid only the code block used to move from test folder to IT folder) |
* Move IT folder to .github folder Signed-off-by: FedeNQ <fedenahuel07@gmail.com> * Add ./.github/it to working directory Signed-off-by: FedeNQ <fedenahuel07@gmail.com> * Change target_dir in tests Signed-off-by: FedeNQ <fedenahuel07@gmail.com> * Change target_dir Signed-off-by: FedeNQ <fedenahuel07@gmail.com> * Change target_dir Signed-off-by: FedeNQ <fedenahuel07@gmail.com> * Add /.github in path Signed-off-by: FedeNQ <fedenahuel07@gmail.com> * change on docker-compose Signed-off-by: FedeNQ <fedenahuel07@gmail.com> * change target_dir in run-postgres-test Signed-off-by: FedeNQ <fedenahuel07@gmail.com> --------- Signed-off-by: FedeNQ <fedenahuel07@gmail.com>
adc80df
to
6c29852
Compare
No need to rewrite the tests. Just move to .github/tests then we can merge. |
I've moved the IT folder to .github |
.github/tests since it is tests |
Signed-off-by: FedeNQ <fedenahuel07@gmail.com>
Signed-off-by: FedeNQ <fedenahuel07@gmail.com>
Signed-off-by: FedeNQ <fedenahuel07@gmail.com>
Signed-off-by: FedeNQ <fedenahuel07@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @FedeNQ for creating these valuable tests.
@FedeNQ I just noticed integration-tests (change-entry-test.sh) is failing |
Signed-off-by: FedeNQ <fedenahuel07@gmail.com>
@faisal-memon I made some changes, and now it passes all checks. Would it be a good idea to re-run all jobs to double-check? |
Thanks, looks good now. |
Changes proposal: