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

test-gen-api-docs always fail at the first run after the api docs have change #2810

Closed
gongmax opened this issue Nov 11, 2022 · 4 comments
Closed
Assignees
Labels
area/tests Unit tests, e2e tests, anything to make sure things don't break kind/bug These are bugs.
Milestone

Comments

@gongmax
Copy link
Collaborator

gongmax commented Nov 11, 2022

What happened:
Currently, the test-gen-api-docs simply generates new api doc from the code and compare it with the old api doc (the agones_crd_api_reference.html file in the workspace), and fails if they do not match. So whenever there is change introduced to api doc, the first run of test-gen-api-docs will always fail because the old doc will definitely not match.

What you expected to happen:
We need to rethink about what should be tested against for a "site-test"/"doc-test". What's the failure scenario we want to catch? The current test doesn't provide much value since it can only catch error of accidental api doc change in the first test run, the following run will succeed anyway.

How to reproduce it (as minimally and precisely as possible):
Add a new field to the GameServerAllocationStatus (pkg/apis/allocation/v1/gameserverallocation.go), and run make test.
Anything else we need to know?:

Environment:

  • Agones version: dev
  • Kubernetes version (use kubectl version): N/A
  • Cloud provider or hardware configuration: N/A
  • Install method (yaml/helm): N/A
  • Troubleshooting guide log(s): N/A
  • Others: N/A
@gongmax gongmax added kind/bug These are bugs. area/tests Unit tests, e2e tests, anything to make sure things don't break labels Nov 11, 2022
@markmandel
Copy link
Collaborator

The test is to ensure that a user runs make gen-api-docs along with their changes to a CRD/Extension -- which is the test we care about. It's probably more about CI than about local testing.

@gongmax
Copy link
Collaborator Author

gongmax commented Nov 11, 2022

Oh, that makes sense. Then maybe better documentation about local development process would help. I run make test after make changes locally so found this issue a little annoying.

@markmandel
Copy link
Collaborator

make test would take a long time I expect! 😄 I usually try and be a bit targeted with which tests I run, and lean on CI for the rest.

@gongmax
Copy link
Collaborator Author

gongmax commented Nov 29, 2022

close this for now since it's as expected.

@gongmax gongmax closed this as completed Nov 29, 2022
@mangalpalli mangalpalli added this to the 1.28.0 milestone Nov 29, 2022
@gongmax gongmax self-assigned this Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tests Unit tests, e2e tests, anything to make sure things don't break kind/bug These are bugs.
Projects
None yet
Development

No branches or pull requests

3 participants