storj-archived / storj-python-sdk

Deprecated. A Python SDK for the Storj API.
https://storj.io
MIT License
23 stars 19 forks source link

Integration tests not running. #34

Closed F483 closed 5 years ago

F483 commented 7 years ago

I added some assertions that should cause them to fail, but this does not happen.

https://github.com/F483/storj-python-sdk/blob/master/tests/integration/bucket_test.py#L67 https://github.com/F483/storj-python-sdk/blob/master/tests/integration/users_test.py#L81

steenzout commented 7 years ago

on travis-ci it will not run integration tests due to this.

this is expected since there is no test integration account created for us to use (yet?).

steenzout commented 7 years ago

to run the tests locally check the slack channel on how to setup the environment.

an example when you don't have the environment setup correctly:

$ tox -e py27 -- --ignore tests/unit
py27 create: /Users/steenzout/Projects/github/steenzout/python/storj/.tox/py27
py27 installdeps: -rrequirements.txt, -rrequirements-extra-cli.txt, -rrequirements-test.txt
py27 develop-inst: /Users/steenzout/Projects/github/steenzout/python/storj
py27 installed: apipkg==1.4,astroid==1.4.8,autopep8==1.2.4,backports.functools-lru-cache==1.3,click==6.6,colorama==0.3.7,configparser==3.5.0,coverage==4.2,ecdsa==0.13,execnet==1.4.1,funcsigs==1.0.2,isort==4.2.5,lazy-object-proxy==1.2.2,mccabe==0.5.2,mock==2.0.0,pbr==1.10.0,pep8==1.7.0,py==1.4.31,pycrypto==2.6.1,pylint==1.6.4,pytest==3.0.3,pytest-cache==1.0,pytest-cov==2.4.0,pytest-pep8==1.0.6,pytest-xdist==1.15.0,pytz==2016.7,requests==2.11.1,simplejson==3.8.2,six==1.10.0,steenzout.object==1.0.10,steenzout.serialization.json==1.0.2,-e git+git@github.com:steenzout/python-storj.git@4a1c8f28363c2cb5b0036c4edeb82d2c639aefcb#egg=storj,strict-rfc3339==0.7,wrapt==1.10.8,ws4py==0.3.5
py27 runtests: PYTHONHASHSEED='2034592081'
py27 runtests: commands[0] | py.test -q --basetemp=/Users/steenzout/Projects/github/steenzout/python/storj/.tox/py27/tmp --confcutdir=.. -n 1 --junitxml=tests/junit.xml --cov-report xml --cov storj --cov-report=html --cov-report term-missing --pep8 --ignore tests/unit
gw0 [17]
scheduling tests via LoadScheduling
................EECoverage.py warning: No data was collected.

-------- generated xml file: /Users/steenzout/Projects/github/steenzout/python/storj/tests/junit.xml ---------

---------- coverage: platform darwin, python 2.7.12-final-0 ----------
Name                    Stmts   Miss  Cover   Missing
-----------------------------------------------------
storj/__init__.py           7      2    71%   20-25
storj/api.py                4      1    75%   20
storj/cli/__init__.py      52     52     0%   2-126
storj/exception.py          3      0   100%
storj/http.py             225    169    25%   46-52, 57, 61, 64-69, 72-74, 82-101, 109-122, 137-162, 175-184, 192-193, 201-203, 216-226, 234-242, 245-247, 253-258, 266-269, 275-287, 297-315, 333-335, 340-356, 368-370, 378-380, 398-406, 414-422, 425-426, 429-440, 444-454, 457-467, 475-480, 483-494, 497-505, 517-519, 531-540
storj/metadata.py           4      0   100%
storj/model.py            151    114    25%   36-53, 56, 72-78, 82, 86, 89, 93-94, 108-119, 125-126, 129-139, 142-149, 152-165, 183-205, 208-215, 223, 227, 233-256, 260, 263, 266-278, 294-302
storj/sdk.py               79     79     0%   3-142
storj/web_socket.py        18     10    44%   12-17, 20, 23, 26-27
-----------------------------------------------------
TOTAL                     543    427    21%
Coverage HTML written to dir htmlcov
Coverage XML written to file coverage.xml

=================================================== ERRORS ===================================================
_______________________________________ ERROR at setup of Bucket.test ________________________________________
[gw0] darwin -- Python 2.7.12 /Users/steenzout/Projects/github/steenzout/python/storj/.tox/py27/bin/python
self = <tests.integration.bucket_test.Bucket testMethod=test>
methodName = 'test'

    def __init__(self, methodName):
        super(Integration, self).__init__(methodName)

        try:
            self.email = os.environ[ENV_STORJ_EMAIL]
            self.password = os.environ[ENV_STORJ_PASSWORD]
        except KeyError as e:
            self.logger.error(e)
            msg = (
                'To run integration tests you need to define '
                'the following environment variables: %s, %s.'
            )
            err_msg = msg % (
                ENV_STORJ_EMAIL, ENV_STORJ_PASSWORD
            )
            self.logger.error(err_msg)
>           self.fail(err_msg)
E           AssertionError: To run integration tests you need to define the following environment variables: STORJ_EMAIL, STORJ_PASSWORD.```
F483 commented 7 years ago

Related issue integration tests will not work well until a specific test bridge is available.

RichardLitt commented 5 years ago

👋 Hey! Thanks for this contribution. Apologies for the delay in responding!

We've decided to rearchitect Storj, so that we can scale better. You can read more about this decision here. This means that we are entirely focused on v3 at the moment, in the storj/storj repository. Our white paper for v3 is coming very, very soon - follow along on the blog and in our Rocketchat.

As this repository is part of the v2 network, we're no longer maintaining this repository. I am going to close this for now. If you have any questions, I encourage you to jump on Rocketchat and ask them there. Thanks!