Skip to content

Commit 725c056

Browse files
committed
Remove FastAPI from end to end test process
1 parent a784b73 commit 725c056

File tree

10 files changed

+696
-949
lines changed

10 files changed

+696
-949
lines changed

CONTRIBUTING.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,19 @@
1717

1818
1. Write some code and make sure it's covered by unit tests. All unit tests are in the `tests` directory and the file
1919
structure should mirror the structure of the source code in the `openapi_python_client` directory.
20-
2. When in a Poetry shell (`poetry shell`) run `task check` in order to run most of the same checks CI runs. This will
21-
auto-reformat the code, check type annotations, run unit tests, check code coverage, and lint the code.
20+
2. When in a Poetry shell (`poetry shell`) run `task check` in order to run most of the same checks CI runs. This will
21+
auto-reformat the code, check type annotations, run unit tests, check code coverage, and lint the code.
2222
3. If you're writing a new feature, try to add it to the end to end test.
23-
1. If adding support for a new OpenAPI feature
24-
1. add the relevant feature to our FastAPI app in `end_to_end_tests/fastapi_app`.
25-
2. Regenerate the OpenAPI document with `task openapi`.
26-
3. Check `end_to_end_tests/openapi.json` to confirm it has the new feature you're trying to test.
27-
2. Regenerate the "golden record" with `task gr`. This is a client generated from the OpenAPI document used for end to end testing.
23+
1. If adding support for a new OpenAPI feature, add it somewhere in `end_to_end_tests/openapi.json`
24+
2. Regenerate the "golden record" with `task regen`. This is a client generated from the OpenAPI document used for end to end testing.
2825
3. Check the changes to `end_to_end_tests/golden-record` to confirm only what you intended to change did change and that the changes look correct.
29-
4. Run the end to end tests with `task e2e`. This will generate a client against `end_to_end_tests/openapi.json` and
30-
compare it with `end_to_end_tests/golden-record`. The test will fail if **anything is different**. The end to end
31-
test is not included in `task check` as it takes longer to run and doesn't provide very useful feedback in the
32-
event of failure. If this test does fail, the easiest way to check what's wrong is to run `task gr` and check
33-
the diff of `golden-record`.
34-
5. Include a summary of your changes in `CHANGELOG.md`. If there isn't an "Unreleased" version in the CHANGELOG yet,
35-
go ahead and add one.
26+
4. Run the end to end tests with `task e2e`. This will generate a client against `end_to_end_tests/openapi.json` and
27+
compare it with `end_to_end_tests/golden-record`. The test will fail if **anything is different**. The end to end
28+
test is not included in `task check` as it takes longer to run and doesn't provide very useful feedback in the
29+
event of failure. If this test does fail, the easiest way to check what's wrong is to run `task regen` and check
30+
the diff of `golden-record`.
31+
5. Include a summary of your changes in `CHANGELOG.md`. If there isn't an "Unreleased" version in the CHANGELOG yet,
32+
go ahead and add one.
3633

3734
## Creating a Pull Request
3835

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,8 @@ get an error.
6464
for endpoints without a tag. Each of these modules in turn contains one function for calling each endpoint.
6565
1. A `models` module which has all the classes defined by the various schemas in your OpenAPI spec
6666

67-
For a full example you can look at the `test_end_to_end` directory which has a declared [FastAPI](https://fastapi.tiangolo.com/)
68-
server and the resulting openapi.json file in the "fastapi" directory. "golden-record" is the generated client from that
69-
OpenAPI document.
67+
For a full example you can look at the `end_to_end_tests` directory which has an `openapi.json` file.
68+
"golden-record" in that same directory is the generated client from that OpenAPI document.
7069

7170
## OpenAPI features supported
7271

end_to_end_tests/fastapi_app/__init__.py

Lines changed: 0 additions & 159 deletions
This file was deleted.

end_to_end_tests/fastapi_app/__main__.py

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)