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

Prints generated Dockerfile lines nicely #178

Merged
merged 2 commits into from Feb 22, 2019

Conversation

youreddy
Copy link

Resolves #111
/cc @ryanmoran

Copy link
Member

@carolynvs carolynvs left a comment

Choose a reason for hiding this comment

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

This is great! I have one small change, to use an existing test helper, and then it is ready to merge.

@@ -39,6 +40,36 @@ func TestPorter_buildDockerfile(t *testing.T) {
assert.Equal(t, wantlines, gotlines)
}

func TestPorter_buildDockerfile_output(t *testing.T) {
buffer := bytes.NewBuffer([]byte{})
Copy link
Member

Choose a reason for hiding this comment

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

I would like to show you a special function that I built into TestPorter that assists with collecting output during a test.

You can remove lines 44 and 46. Then on line 70, change buffer.String to p.TestConfig.TestContext.GetOutput().

The TestPorter struct does the same thing that you did in the test (make a byte buffer) and then exposes it as a string with GetOputput().

Copy link
Author

Choose a reason for hiding this comment

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

That makes sense to me! Just updated the branch to reflect those changes.

@carolynvs
Copy link
Member

I'm excited to have you contributing to porter! Please let me know if you are interested in more issues, and I can help you find another. 😀

Urvashi Reddy added 2 commits February 21, 2019 14:48
@youreddy
Copy link
Author

I'm excited to have you contributing to porter! Please let me know if you are interested in more issues, and I can help you find another. 😀

@carolynvs thank you for being so welcoming. We're excited to be contributing in this space.

Copy link
Member

@carolynvs carolynvs left a comment

Choose a reason for hiding this comment

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

Looks good, thanks! ✨

@carolynvs carolynvs merged commit 21a21f8 into getporter:master Feb 22, 2019
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.

None yet

2 participants