magic-modules icon indicating copy to clipboard operation
magic-modules copied to clipboard

TeamCity: test utils refactor

Open SarahFrench opened this issue 11 months ago • 6 comments

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)


SarahFrench avatar Mar 26 '24 11:03 SarahFrench

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(-))

modular-magician avatar Mar 26 '24 11:03 modular-magician

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(-))

modular-magician avatar Mar 28 '24 16:03 modular-magician

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(-))

modular-magician avatar Mar 28 '24 17:03 modular-magician

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(-))

modular-magician avatar Mar 28 '24 17:03 modular-magician

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(-))

modular-magician avatar Apr 26 '24 12:04 modular-magician

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(-))

modular-magician avatar Apr 26 '24 18:04 modular-magician

I just rebased this branch to get the new stuff from main, and I'll update the new tests

SarahFrench avatar May 13 '24 12:05 SarahFrench

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(-))

modular-magician avatar May 13 '24 12:05 modular-magician

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(-))

modular-magician avatar May 13 '24 12:05 modular-magician

Waiting to merge until after the service and project sweepers run today

SarahFrench avatar May 13 '24 12:05 SarahFrench