Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

Testing out of a git repository fails on 0.20 #215

Closed
rdoursenaud opened this issue Jul 11, 2017 · 8 comments
Closed

Testing out of a git repository fails on 0.20 #215

rdoursenaud opened this issue Jul 11, 2017 · 8 comments

Comments

@rdoursenaud
Copy link
Contributor

Testing while packaging (for Arch Linux's AUR) fails:

2017-07-11-makepkg.log.txt

IMHO, the git repository shouldn't be needed to allow running the tests.

I've disabled the tests in the package for now.

@sayoun
Copy link
Contributor

sayoun commented Jul 12, 2017

We need a git repository to test the paas deploy commands and check for regressions. The git repository used is temporary and only created for the duration of tests so I don't understand why it breaks on Arch, maybe we don't have permissions to create a temporary directory during the packaging ?

It uses Click file system isolation http://click.pocoo.org/5/testing/#file-system-isolation

@koobs
Copy link
Contributor

koobs commented Sep 12, 2017

I am seeing identical failures testing the 0.21 PyPI sdist during FreeBSD Ports QA:

Error:

Traceback (most recent call last):
  File "/usr/home/koobs/repos/freebsd/ports/www/py-gandi.cli/work/gandi.cli-0.21/gandi/cli/tests/commands/test_paas.py", line 343, in test_deploy_remote
    """)
AssertionError: u"Error: Could not find git remote to extract deploy url from.\nThis usually hap [truncated]... != u"ssh 185290@git.dc2.gpaas.net 'deploy default.git master'\n"
+ ssh 185290@git.dc2.gpaas.net 'deploy default.git master'
- Error: Could not find git remote to extract deploy url from.
- This usually happens when:
<snip>

For the following tests:

FAIL: test_deploy (gandi.cli.tests.commands.test_paas.PaasTestCase)
FAIL: test_deploy_guess_remote_with_branch (gandi.cli.tests.commands.test_paas.PaasTestCase)
FAIL: test_deploy_invalid_remote_content (gandi.cli.tests.commands.test_paas.PaasTestCase)
FAIL: test_deploy_remote (gandi.cli.tests.commands.test_paas.PaasTestCase)

Earlier test output shows:

test_delete_unknown (gandi.cli.tests.commands.test_paas.PaasTestCase) ... ok
test_deploy (gandi.cli.tests.commands.test_paas.PaasTestCase) ... fatal: --local can only be used inside a git repository
fatal: --local can only be used inside a git repository
fatal: --local can only be used inside a git repository
FAIL
test_deploy_guess_remote_with_branch (gandi.cli.tests.commands.test_paas.PaasTestCase) ... fatal: --local can only be used inside a git repository
fatal: --local can only be used inside a git repository
fatal: --local can only be used inside a git repository
FAIL
test_deploy_invalid_remote_content (gandi.cli.tests.commands.test_paas.PaasTestCase) ... fatal: --local can only be used inside a git repository
fatal: --local can only be used inside a git repository
fatal: --local can only be used inside a git repository
FAIL
test_deploy_invalid_remote_empty (gandi.cli.tests.commands.test_paas.PaasTestCase) ... fatal: --local can only be used inside a git repository
fatal: --local can only be used inside a git repository
fatal: --local can only be used inside a git repository
ok
test_deploy_remote (gandi.cli.tests.commands.test_paas.PaasTestCase) ... fatal: --local can only be used inside a git repository
fatal: --local can only be used inside a git repository
fatal: --local can only be used inside a git repository
FAIL
test_info (gandi.cli.tests.commands.test_paas.PaasTestCase) ... ok

Git version is: git version 2.14.1

Tests should be skipped (not fail) if a git repository is not available or the git command executed returns an error.

@sayoun
Copy link
Contributor

sayoun commented Sep 12, 2017

Hello,

I'm working on this, Travis also fail on the same tests, should be fixed today.

@koobs
Copy link
Contributor

koobs commented Sep 12, 2017

Making the tests robusts to any error (skipping the test) rather than just this specific one would be great.

@sayoun
Copy link
Contributor

sayoun commented Sep 12, 2017

No the tests should not be skipped, we need to test the deploy command interacting with git, see my comment #215 (comment)

uqs pushed a commit to freebsd/freebsd-ports that referenced this issue Sep 12, 2017
Remove post-extract target, removal of compiled files from sdist has
been merged upstream [1].

Note: A number of PaaS tests fail, this has been reported upstream [2].

[1] Gandi/gandi.cli#180
[2] Gandi/gandi.cli#215


  https://github.com/Gandi/gandi.cli/blob/0.21/CHANGES.rst

Requested by:	bapt


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@449679 35697150-7ecd-e111-bb59-0022644237b5
uqs pushed a commit to freebsd/freebsd-ports that referenced this issue Sep 12, 2017
Remove post-extract target, removal of compiled files from sdist has
been merged upstream [1].

Note: A number of PaaS tests fail, this has been reported upstream [2].

[1] Gandi/gandi.cli#180
[2] Gandi/gandi.cli#215


  https://github.com/Gandi/gandi.cli/blob/0.21/CHANGES.rst

Requested by:	bapt
@sayoun
Copy link
Contributor

sayoun commented Sep 12, 2017

I pushed a fix for tests so they don't rely on external git command, this should cover all case. I don't know if you can use the latest master branch from github to confirm this on your side, on Travis all tests are green again.

@sayoun
Copy link
Contributor

sayoun commented Sep 13, 2017

This should be fixed in 0.22, I'm closing this, feel free to reopen if this is still an issue.

@sayoun sayoun closed this as completed Sep 13, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants