Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Make GitFlowVersion tests play nice when being run by a TeamCity agent #45

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 2 commits into from
Nov 27, 2013
Merged

Make GitFlowVersion tests play nice when being run by a TeamCity agent #45

merged 2 commits into from
Nov 27, 2013

Conversation

nulltoken
Copy link
Contributor

#32 introduced some test coverage in order to ensure that GFV was behaving as expected when being leveraged in a build tool chain on a TeamCity agent.

The way GFV detects this context is by probing the existence of a TEAMCITY_VERSION environment variable.

However, when those tests actually ran on a TeamCity agent, this very variable was always set which led to some failures.

This PR introduces a switch regarding the probing mechanism.

  • TEAMCITY_VERSION will be used when GFV is being run as a MSBuild task
  • GitFlowVersion.Fake.TEAMCITY_VERSION will be used when testing GFV

@nulltoken
Copy link
Contributor Author

@andreasohlund It looks like there are no agents available to build this one. Could you please take a look?

@andreasohlund
Copy link
Contributor

They just take a while to spin up (aws dynamic instances).

Sent from my iPhone

On 27 nov 2013, at 17:03, nulltoken [email protected] wrote:

@andreasohlund It looks like there are no agents available to build this one. Could you please take a look?


Reply to this email directly or view it on GitHub.

@nulltoken
Copy link
Contributor Author

This PR now makes TeamCity happy.

  • Introduce a dedicated way to fake TeamCity context
  • Force the checkout of branches in tests to avoid conflicts

I'm no quite sure to understand why did Checkout() cringed in the first place. I'll investigate this further as a separate LibGit2Sharp task.

andreasohlund added a commit that referenced this pull request Nov 27, 2013
Make GitFlowVersion tests play nice when being run by a TeamCity agent
@andreasohlund andreasohlund merged commit 3209e39 into GitTools:master Nov 27, 2013
@nulltoken nulltoken deleted the ntk/fix/faked_teamcity_context branch November 27, 2013 18:21
nulltoken referenced this pull request in JakeGinnivan/GitHubFlowVersion Dec 14, 2013
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.

2 participants