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

Document and test using SECRETS_DIR environment variable #250

Closed
joshrabinowitz opened this issue Aug 18, 2018 · 3 comments
Closed

Document and test using SECRETS_DIR environment variable #250

joshrabinowitz opened this issue Aug 18, 2018 · 3 comments

Comments

@joshrabinowitz
Copy link
Collaborator

joshrabinowitz commented Aug 18, 2018

For #247 , which supports changing the name of the .gitsecret directory via the SECRETS_DIR env var.

@lrascao said:

Regarding the tests and since this is a global option that affects all commands, what would be a good strategy?

@joshrabinowitz
Copy link
Collaborator Author

joshrabinowitz commented Aug 18, 2018

Some ideas on how to test this feature:

Automate the test run to run every test twice, once with SECRETS_DIR set, and once without.

  • Pros: Comprehensive.
  • Cons: Doubles testing time.

OR

Always set the SECRETS_DIR env var in the test setup code and assume that the default .gitsecret works. (Edit: this was implemented in #251)

  • Pros: Simple to implement. This is probably the right thing to do first.
  • Cons: We're assuming it works without setting SECRETS_DIR.

OR

Tweak to above: Do the above test, and add a test for each of the test files that specifically doesn't set the SECRETS_DIR env var.

  • Pros: Comprehensive, probably the right way to go in the long run.
  • Cons: Sort of a lot of code to write.

@joshrabinowitz
Copy link
Collaborator Author

joshrabinowitz commented Sep 5, 2018

#251 adds the test "Always set the SECRETS_DIR env var in the test setup code and assume that the default .gitsecret works" described above. It also documents use of the SECRETS_DIR env var.

git-secret.io should reflect this feature when the next version is released.
Above moved to #250

@joshrabinowitz
Copy link
Collaborator Author

Since git-secret.io doc item moved to #250, this is complete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant