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

Check for docker-compose on init #65

Merged
merged 1 commit into from
Jan 22, 2018
Merged

Conversation

bobheadxi
Copy link
Member

@bobheadxi bobheadxi commented Jan 22, 2018

βŒ› Status: ready

🎟️ Ticket(s): Close #36 Warn if inertia init in non-docker-compose project


πŸ‘· Changes

  • Now runs a check to see if we are in a docker-compose directory when user runs inertia init

πŸ”¦ Testing Instructions

go install
inertia init

@bobheadxi bobheadxi added the pr: finalized needs review and final approval label Jan 22, 2018
@coveralls
Copy link

coveralls commented Jan 22, 2018

Coverage Status

Coverage increased (+1.5%) to 23.184% when pulling fc06bda on rob/#36-docker-compose-check into 9b5c4ff on master.

Copy link
Contributor

@chadlagore chadlagore left a comment

Choose a reason for hiding this comment

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

Very often (basically always), I have a separate compose yaml for prod (whenever I do this type of deployment technique). I think this is OK for now, but it might make sense to add a flag in the future.

inertia init --compose-file docker-compose-prod.yml

assert.Equal(t, nil, CheckForGit(inertia))
}

func TestCheckForDockerCompose(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

We need containers for this type of testing πŸ˜…

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe, but a container would probably be a bit overkill for this because all it does is check for the presence of the docker-compose.yml file

Copy link
Contributor

Choose a reason for hiding this comment

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

Its more this contamination of the developers file system during tests. Say someone creates a docker-compose.yml file in this repo one day, then they run this test. The test failing is the best we can hope for, the worst is that it nukes their file.

Copy link
Member Author

Choose a reason for hiding this comment

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

ah spooky

@bobheadxi
Copy link
Member Author

Most will stil have the standard docker-compose.yml file right?

@bobheadxi bobheadxi merged commit 45891ff into master Jan 22, 2018
@bobheadxi bobheadxi deleted the rob/#36-docker-compose-check branch January 22, 2018 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: finalized needs review and final approval
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants