Remove test dependency on local config. #75

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@rdunklau
Contributor

rdunklau commented Feb 13, 2013

The tests depend on both:

  • the systems locale
  • the user sqitch configuration (and maybe the system configuration too)

For example, the add.t test will incorrectly use the users "templates" directory (~/.sqitch/templates), or the revert.t test will assume that no deploy variables are set.

This patch fixes the dependency to the sqitch configuration, by:

  • providing "dummy" user and system configuration for the revert test
  • looking up the user directory in an environment variable before assuming the ~/.sqitch/ directory.

However, the dependency on the systems locale is not fixed. Would it be possible to set the LANG to en_US before each test ?

@theory

This comment has been minimized.

Show comment Hide comment
@theory

theory Feb 13, 2013

Owner

I understand the revert.t fix, but not the other. Is the issue with the template directory that the test will fail if ~/.sqitch/templates` actually exists?

As for the locale failure, can you tell me how to replicate it? I kind of like the tests to run in different locales, as it helps to ensure that Sqitch is properly localized.

Owner

theory commented Feb 13, 2013

I understand the revert.t fix, but not the other. Is the issue with the template directory that the test will fail if ~/.sqitch/templates` actually exists?

As for the locale failure, can you tell me how to replicate it? I kind of like the tests to run in different locales, as it helps to ensure that Sqitch is properly localized.

@rdunklau

This comment has been minimized.

Show comment Hide comment
@rdunklau

rdunklau Feb 13, 2013

Contributor

Yes, the test fail if the ~/.sqitch/templates directory exists.

As for the locale failure, you should be able to replicate it by running:

LANG=fr_FR dzil test
Contributor

rdunklau commented Feb 13, 2013

Yes, the test fail if the ~/.sqitch/templates directory exists.

As for the locale failure, you should be able to replicate it by running:

LANG=fr_FR dzil test
@theory

This comment has been minimized.

Show comment Hide comment
@theory

theory Feb 13, 2013

Owner

Okay, I believe I've fixed the locale issues in 8c25d81 and c9ba4bd.

Owner

theory commented Feb 13, 2013

Okay, I believe I've fixed the locale issues in 8c25d81 and c9ba4bd.

@theory

This comment has been minimized.

Show comment Hide comment
@theory

theory Feb 13, 2013

Owner

Okay, pulled in your fix for t/revert.t in 7bc58ba, and fixed the t/add.t bug in 72bd6f4. Thanks!

Owner

theory commented Feb 13, 2013

Okay, pulled in your fix for t/revert.t in 7bc58ba, and fixed the t/add.t bug in 72bd6f4. Thanks!

@theory theory closed this Feb 13, 2013

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