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

Refactor testing pipeline #592

Open
wants to merge 58 commits into
base: main
Choose a base branch
from
Open

Refactor testing pipeline #592

wants to merge 58 commits into from

Conversation

JVT038
Copy link
Collaborator

@JVT038 JVT038 commented Feb 27, 2024

I have generated HTTP tests for all endpoints defined in the OpenAPI specs.

Used command:

docker run --rm \
    -v "${PWD}:/local" openapitools/openapi-generator-cli generate \
    -i /local/docs/openapi.json \
    -g jetbrains-http-client \
    -o /local/movaryClient \
    --skip-validate-spec

I think the addition of @name is a good one, because it makes it easier for us to see which tests have failed / passed.

Besides that, this PR can be used as a start to test all the endpoints, because we can now just copy-paste the very basics into the tests/rest/api directory (where we'll be placing the actual tests).

I have also changed the testing workflow, renaming run_tests to run_php_tests and adding run_http_tests which should automatically run all the HTTP tests in the HTTP directory (not tested if this works though).

This PR is just a draft, meant as an example, not as an actual solution.

Some references:

Signed-off-by: JVT038 <47184046+JVT038@users.noreply.github.com>
Signed-off-by: JVT038 <47184046+JVT038@users.noreply.github.com>
@JVT038 JVT038 changed the title Generated HTTP tests Improve HTTP testing Feb 27, 2024
Signed-off-by: JVT038 <47184046+JVT038@users.noreply.github.com>
Signed-off-by: JVT038 <47184046+JVT038@users.noreply.github.com>
Signed-off-by: JVT038 <47184046+JVT038@users.noreply.github.com>
Signed-off-by: JVT038 <47184046+JVT038@users.noreply.github.com>
Signed-off-by: JVT038 <47184046+JVT038@users.noreply.github.com>
Signed-off-by: JVT038 <47184046+JVT038@users.noreply.github.com>
Signed-off-by: JVT038 <47184046+JVT038@users.noreply.github.com>
Signed-off-by: JVT038 <47184046+JVT038@users.noreply.github.com>
Signed-off-by: JVT038 <47184046+JVT038@users.noreply.github.com>
Signed-off-by: JVT038 <47184046+JVT038@users.noreply.github.com>
Signed-off-by: JVT038 <47184046+JVT038@users.noreply.github.com>
Signed-off-by: JVT038 <47184046+JVT038@users.noreply.github.com>
Signed-off-by: JVT038 <47184046+JVT038@users.noreply.github.com>
Signed-off-by: JVT038 <47184046+JVT038@users.noreply.github.com>
Signed-off-by: JVT038 <47184046+JVT038@users.noreply.github.com>
Signed-off-by: JVT038 <47184046+JVT038@users.noreply.github.com>
Signed-off-by: JVT038 <47184046+JVT038@users.noreply.github.com>
Signed-off-by: JVT038 <47184046+JVT038@users.noreply.github.com>
Signed-off-by: JVT038 <47184046+JVT038@users.noreply.github.com>
Signed-off-by: JVT038 <47184046+JVT038@users.noreply.github.com>
Signed-off-by: JVT038 <47184046+JVT038@users.noreply.github.com>
Signed-off-by: JVT038 <47184046+JVT038@users.noreply.github.com>
Signed-off-by: JVT038 <47184046+JVT038@users.noreply.github.com>
Signed-off-by: JVT038 <47184046+JVT038@users.noreply.github.com>
@JVT038 JVT038 changed the title Improve HTTP testing Refactor testing pipeline Feb 29, 2024
@leepeuker
Copy link
Owner

The pipeline no longer builds and runs a local docker image of Movary; instead, it uses the native PHP built-in webserver

That is not something I want to go for. Every environment and build step should use the same docker setup. This guarantees our builds to be reproducible and isolated in all environments.

@JVT038
Copy link
Collaborator Author

JVT038 commented Mar 22, 2024

I have managed to fix the CI pipeline and ensure that it all runs inside a docker container that's created from the Dockerfile image.

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.

2 participants