Skip to content

Add a test suite to the team repository #418

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

Merged
merged 7 commits into from
Aug 28, 2020

Conversation

pietroalbini
Copy link
Member

Up until now there was no test suite for the team repository, and that started to bite us recently (for example with the inclusion of working group leads in the leads team).

This PR adds a test suite to the team repository similar to compiletest: inside tests/static-api there is another "team repository" with some dummy data, and the test suite ensures its output of the static API matches the expected one committed to the repository. If the output doesn't match a diff is displayed, and the tests/bless.sh script can be used to bless the new output.

The test suite doesn't fully cover everything yet, but it's a start: I'll followup with other PRs in the near future.

Verified

This commit was signed with the committer’s verified signature.
pietroalbini Pietro Albini

Verified

This commit was signed with the committer’s verified signature.
pietroalbini Pietro Albini
@Mark-Simulacrum
Copy link
Member

I think I would prefer to use dummy (e.g., bot -- including existing) accounts for the testing. While I don't plan to leave anytime soon, I do semi-frequently run things like rg <username> in the team repo to find out what teams a user is on, and having users belong to test-only teams seems annoying for that.

Verified

This commit was signed with the committer’s verified signature.
pietroalbini Pietro Albini

Verified

This commit was signed with the committer’s verified signature.
pietroalbini Pietro Albini

Verified

This commit was signed with the committer’s verified signature.
pietroalbini Pietro Albini
@pietroalbini
Copy link
Member Author

@Mark-Simulacrum good point!

I changed all the users in tests with dummy users, and added a --skip flag to cargo run check to skip individual validation checks (since we need to disable the validate_github_usernames check).

@Mark-Simulacrum
Copy link
Member

This looks good to me with CI fixed.

Verified

This commit was signed with the committer’s verified signature.
pietroalbini Pietro Albini

Verified

This commit was signed with the committer’s verified signature.
pietroalbini Pietro Albini
@pietroalbini pietroalbini merged commit f45565a into rust-lang:master Aug 28, 2020
@pietroalbini pietroalbini deleted the tests branch August 28, 2020 14:55
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.

None yet

3 participants