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

CI: Running tests removes the IRC package, and other local-install corruptions #121

Closed
richteer opened this issue Oct 3, 2018 · 5 comments · Fixed by #126
Closed

CI: Running tests removes the IRC package, and other local-install corruptions #121

richteer opened this issue Oct 3, 2018 · 5 comments · Fixed by #126
Assignees
Labels

Comments

@richteer
Copy link
Contributor

richteer commented Oct 3, 2018

All tests should be running in a totally different namespace, and NOT using the packages directory as part of the cloned repo. This is a severe bug, as it messes with the typical local Halibot development environment.

Furthermore, we shouldn't test fetch as part of the cli tests, since that depends on a repo server being accessible -- a failure on the side of the repo server SHOULD NOT lead to a test failure.

@richteer
Copy link
Contributor Author

richteer commented Oct 3, 2018

@sjrct Tagging you in this, since I think you are the one that wrote these test cases. Suggestions on how to proceed?

@richteer
Copy link
Contributor Author

richteer commented Oct 3, 2018

From main.py's implementation of unfetch:

        for pkgpath in bot.config["package-path"]:
            path = os.path.join(pkgpath, name)
            if os.path.exists(path):
                shutil.rmtree(path)
                print("Removed '{}' installed to '{}'.".format(name, path))
                success = True

We delete packages from all applicable package-paths. This should most certainly not be intended.

@richteer
Copy link
Contributor Author

richteer commented Oct 3, 2018

Opened #122 to track this portion of the bug.

Leaving this one open since there's still work to be fixed here: CLI tests should be totally self-contained, and not affect packages outside of its path (therefore, we should probably force package-path to be local-only), and should not depend on remote resources to pass tests.

I'd rather see coverage decrease in main.py than have a test that requires a remote server to pass.

@sjrct
Copy link
Member

sjrct commented Jan 31, 2019

The solution for tests I think would be to limit the package-path of the test all configs to only point to those for the local install.

@sjrct
Copy link
Member

sjrct commented Jan 31, 2019

I'll work on this.

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

Successfully merging a pull request may close this issue.

2 participants