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 workdir cmdline arg #158

Merged
merged 5 commits into from
Dec 3, 2020
Merged

Add workdir cmdline arg #158

merged 5 commits into from
Dec 3, 2020

Conversation

dylanhitt
Copy link
Member

@dylanhitt dylanhitt commented Dec 1, 2020

Fixes #156

Checklist

  • Added unit / integration tests for windows, macOS and Linux?
  • Added a changelog entry in CHANGELOG.md?
  • Updated the documentation (README.md, docs)?
  • Does your change work on Linux, Windows and macOS?

@dylanhitt
Copy link
Member Author

@SimonBaeumer I'll probably have the prototype PR up for the Test_Command refactor by this weekend.

Let me know if this needs any changes. Best

@@ -178,6 +178,11 @@ func Test_ConvergeResults(t *testing.T) {
assert.Equal(t, 1, actual.Failed)
}

func Test_TestCommand_InvalidDir(t *testing.T) {
err := TestCommand("foo", TestCommandContext{Workdir: "invalid_dir"})
Copy link
Member

@SimonBaeumer SimonBaeumer Dec 2, 2020

Choose a reason for hiding this comment

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

this needs a check for windows like

if runtime.GOOS == "windows" {
    assert....
} else {
    assert...
}

@SimonBaeumer
Copy link
Member

LGTM, only one small change necessary in the unit tests for windows

@dylanhitt dylanhitt force-pushed the add-workdir-cmdline-arg branch from 8341543 to bda6b73 Compare December 3, 2020 00:44
@codeclimate
Copy link

codeclimate bot commented Dec 3, 2020

Code Climate has analyzed commit bda6b73 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 92.4% (0.0% change).

View more on Code Climate.

Copy link
Member

@SimonBaeumer SimonBaeumer left a comment

Choose a reason for hiding this comment

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

Nice!
@dylanhitt feel free to merge it

@dylanhitt dylanhitt merged commit 4675a95 into master Dec 3, 2020
@dylanhitt dylanhitt deleted the add-workdir-cmdline-arg branch December 3, 2020 22:20
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.

user should be able to set the working dir with --workdir
2 participants