Skip to content
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

Add a new itest to assert new services have a desired_state of start #227

Merged
merged 2 commits into from
Feb 4, 2016

Conversation

nhandler
Copy link
Contributor

@nhandler nhandler commented Feb 4, 2016

This new itest should avoid us adding code that modifies deployments.json in such a way that new services no longer have a desired_state of 'start'. This should help avoid incidents like #223 from happening again.

@nhandler nhandler self-assigned this Feb 4, 2016
@@ -5,3 +5,8 @@ Feature: Per-Service Deployments.json can be written and read back
When paasta stop is run against the repo
And we generate deployments.json for that service
Then that deployments.json can be read back correctly

Scenario: New services have a desired_state of "start"
Given a test git repo is setup with commits
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work with the existing git-repo in place? In the previous scenario we run paasta "stop", so I guess we .. somehow clear out the git repo between scenarios?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is that the context is cleared between the scenarios (and the tests appear to confirm that). This is also why I removed the shutil.rmtree call in the corresponding step (it would cause issues if you try and chain multiple 'then' steps).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool.

@solarkennedy
Copy link
Contributor

Ship. When you do tdd on your tags thing, this test should fail. (will read back "deploy" as the desired state) then write some safeguard code and it should pass.

nhandler added a commit that referenced this pull request Feb 4, 2016
Add a new itest to assert new services have a desired_state of start
@nhandler nhandler merged commit 28c80ee into master Feb 4, 2016
@nhandler nhandler removed the in review label Feb 4, 2016
@nhandler nhandler deleted the new-service-desired-start branch February 4, 2016 18:33
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