-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
TeamCity: test utils refactor #10290
Conversation
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
1 similar comment
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
(gaProject!!.subProjects + betaProject!!.subProjects).forEach{p -> | ||
(gaProject.subProjects + betaProject.subProjects + projectSweeperProject.subProjects).forEach{p -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not having to assert a variable isn't null feels good man
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This refactor makes the tests use the new helpers but also updates the tests to include the new 'project sweeper' project
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't a refactor of a test, this is just straight-up fixing a test that wasn't iterating over anything; the root project contains no build configurations.
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 💯
I've also added a new test nonVCRBuildShouldHaveSaveArtifactsToGCS
in mmv1/third_party/terraform/.teamcity/tests/build_configuration_features.kt in a recent PR and it probably needs to be updated as well. Let me know if there's anything I can help
Previously they described what they were asserting, instead of saying what was wrong/what the desired state is
The word project is used to frequently to be a meaningful variable name!
506faa3
to
904103c
Compare
I just rebased this branch to get the new stuff from main, and I'll update the new tests |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
1 similar comment
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Waiting to merge until after the service and project sweepers run today |
This PR:
Test utils:
Previously there was a
getSubProject
function that would retrieve a project that was nested 2 levels deep from a starting project. It was always given the root of the TeamCity project and was used to pull out projects from within the Google or Google Beta projects.Now,
getSubProject
does something more logical given its name. You supply aProject
and the name of a subproject within it, and it'll return aProject
object for that subproject. This can be used to make assertions on, etc.The original functionality of retrieving a project from 2 levels of nesting is now fulfilled by
getNestedProjectFromRoot
, which uses getSubProject internally.This PR refactors existing acceptance tests to use the new test utils.
Error message framing
Messages needed to be rewritten to be pointing out why a given test would fail.
Release Note Template for Downstream PRs (will be copied)