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

Tests: Avoid skipping tests due to missing files #42

Closed
wants to merge 1 commit into from

Conversation

mirielka
Copy link
Contributor

@mirielka mirielka commented Aug 31, 2016

When running test_install/test_updates and test_pkcs10/test_pkcs10 as
outoftree, these are skipped with reason 'Unable to find test update files'.
For outoftree tests wrong paths are checked for these files.
Adding proper paths to test setup.

https://fedorahosted.org/freeipa/ticket/6284

@MartinBasti
Copy link
Contributor

I don't like this. Will we have if/elif for each possible location of where tests are executed. What changed? I'm sure those tests work in past. Why dir where test is executed was changed?

@mirielka
Copy link
Contributor Author

So far these tests were skipped in outoftree jobs because they could not find the requested files. The reason is that intree the tests are run from parent directory of ipatests directory, whereas outoftree tests run from ipatests directory itself. Unless the path is added to tests or outoftree tests start running from parent directory, these tests will fail.

@MartinBasti
Copy link
Contributor

Probably instead of that magic, there could be:

self.testdir = os.path.abspath(os.path.dirname(__file__))

It should always find the proper local directory

And please in read_file, instead of plus sign, use os.path.join(self.testdir, filename)

@MartinBasti MartinBasti self-assigned this Sep 1, 2016
When running test_install/test_updates and test_pkcs10/test_pkcs10 as
outoftree, these are skipped with reason 'Unable to find test update files'.
For outoftree tests wrong paths are checked for these files.
Changing file localization to provide proper test setup.

https://fedorahosted.org/freeipa/ticket/6284
@MartinBasti MartinBasti added the ack Pull Request approved, can be merged label Sep 1, 2016
@MartinBasti MartinBasti added the pushed Pull Request has already been pushed label Sep 1, 2016
@MartinBasti MartinBasti closed this Sep 1, 2016
@mirielka mirielka deleted the master_fileexists branch September 5, 2016 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ack Pull Request approved, can be merged pushed Pull Request has already been pushed
Projects
None yet
2 participants