magic-modules
magic-modules copied to clipboard
TeamCity: test utils refactor
This PR:
- updates the test utils used in the tests for the TeamCity config code.
- changes error messages to be framed the correct way
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 a Project
and the name of a subproject within it, and it'll return a Project
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)
Hi there, I'm the Modular magician. I've detected the following information about your changes:
Diff report
Your PR generated some diffs in downstreams - here they are.
google
provider: Diff ( 5 files changed, 81 insertions(+), 75 deletions(-))
Hi there, I'm the Modular magician. I've detected the following information about your changes:
Diff report
Your PR generated some diffs in downstreams - here they are.
google
provider: Diff ( 5 files changed, 71 insertions(+), 75 deletions(-))
Hi there, I'm the Modular magician. I've detected the following information about your changes:
Diff report
Your PR generated some diffs in downstreams - here they are.
google
provider: Diff ( 5 files changed, 75 insertions(+), 82 deletions(-))
Hi there, I'm the Modular magician. I've detected the following information about your changes:
Diff report
Your PR generated some diffs in downstreams - here they are.
google
provider: Diff ( 5 files changed, 76 insertions(+), 83 deletions(-))
Hi there, I'm the Modular magician. I've detected the following information about your changes:
Diff report
Your PR generated some diffs in downstreams - here they are.
google
provider: Diff ( 5 files changed, 76 insertions(+), 83 deletions(-))
Hi there, I'm the Modular magician. I've detected the following information about your changes:
Diff report
Your PR generated some diffs in downstreams - here they are.
google
provider: Diff ( 6 files changed, 84 insertions(+), 97 deletions(-))
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 report
Your PR generated some diffs in downstreams - here they are.
google
provider: Diff ( 6 files changed, 91 insertions(+), 104 deletions(-))
Hi there, I'm the Modular magician. I've detected the following information about your changes:
Diff report
Your PR generated some diffs in downstreams - here they are.
google
provider: Diff ( 6 files changed, 91 insertions(+), 104 deletions(-))
Waiting to merge until after the service and project sweepers run today