Skip to content

Commit

Permalink
test: add e2e scenarios for create-cd (#69)
Browse files Browse the repository at this point in the history
* test: add e2e scenarios for create-cd

Signed-off-by: Jennifer Power <[email protected]>

* test: updates test_e2e.py with additional assertions

Adds assertions to check the command outcome
Adds a function to check if the image exists
Updates e2e README.md

Signed-off-by: Jennifer Power <[email protected]>

---------

Signed-off-by: Jennifer Power <[email protected]>
  • Loading branch information
jpower432 authored Oct 30, 2023
1 parent b28e496 commit 12af59f
Show file tree
Hide file tree
Showing 3 changed files with 308 additions and 63 deletions.
12 changes: 11 additions & 1 deletion tests/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,14 @@ To run the end-to-end tests, follow these steps:
## Additional Notes
- The WireMock tool is used to mock Git server endpoints for testing.
- Podman is used for container and pod management and to build the container image for the mock API server.
- In the future, we plan to provide an option to use pre-built trestle-bot container images from a registry instead of building them locally.
- If the images are not already built, the `make test-e2e` command will build them automatically and remove them at the end of the test. If not, you can build them manually with the following command from the root of the project directory:

```bash
podman build -t localhost/mock-server:latest -f tests/e2e/Dockerfile tests/e2e
podman build -t localhost/trestlebot:latest -f Dockerfile .
```

## Future Improvements
- Provide an option to use pre-built trestle-bot container images from a registry instead of building them locally.
- Create endpoints that mock GitHub and GitLab API calls for pull request creation.
- Add more end-to-end tests to cover more use cases.
Loading

0 comments on commit 12af59f

Please sign in to comment.