11 Commits

Author SHA1 Message Date
David Lenwell
51907ce792 Changed default url to api.refstack.net rather than .org
Change-Id: Ie5e70bb46eef6637066c8106e0b90d6c217d81b3
2015-01-23 01:28:00 -08:00
sslypushenko
9403991171 Updating tests results format according to spec
Spec:
https://github.com/stackforge/refstack/blob/master/specs/approved/api-v1.md

Update patch:
https://review.openstack.org/#/c/146680/

Change-Id: I75c62090a45d742b88acdfe080e24d62658976ce
2015-01-15 19:51:10 +02:00
Paul Van Eck
38e6276737 Added the actual post request to upload
Change-Id: I4297ec4c44c84c2c7b1fefe5f65eac55e5a6845e
2015-01-12 22:53:23 -08:00
Paul Van Eck
456b885255 Change returncode checking to file checking
Previously, after the run_tempest script, was run, all post-processing
was done only if the returncode was 0. If it was non-zero, an error message
was given. This was an oversight, as the run_tempest script will return a code
of 1 when any test case fails. This leaves the unintended side effect of refstack
not parsing the results or producing the output json when Tempest successfully
runs, but a test case fails.

Checking for the existence of the expected subunit file will at least validate
that the Tempest test was at least started successfully, and didn't fail to run
due to some misconfiguration in the environment.

Change-Id: I541b798db41b713525efeb8dedfb9347be780a3f
2015-01-07 10:54:55 -08:00
sslypushenko
13ea5ab160 Setup_env script should install Tempest from tag
setup_env script should be able to install Tempest from specific tag
release. Key -t added to setup_env script. It specifies Tempest tag
release which will be installed as a test runner. By default last tag
from Tempest github repository will be used. Installed by setup script,
Tempest test runner is only single available option for now. Because of
it, option --tempest-dir option is removed from refstack-client

https://storyboard.openstack.org/#!/story/309
https://storyboard.openstack.org/#!/story/324

Change-Id: I182c3870a7ce4bbcb188836d189538dfd54b1c26
2014-12-12 14:10:13 +02:00
Paul Van Eck
6c3f3a1a02 Add ability to upload test results
Split refstack-client into two subcommands: upload and test.
The 'test' command will run Tempest like before, while 'upload'
takes in a result file argument and will upload it to the Refstack
API url. Testing with refstack-client now saves a JSON result file
containing the content of what will or would be posted to the
Refstack API.

Change-Id: I28bcb75b51b77872f39e144ae8ffa7e64b26b233
2014-10-26 18:03:43 -07:00
sslypushenko
6e6ced6436 Replace setup_ubuntu_env.sh to universal script
Ubuntu setup script removed.
New setup script was tested on latest vesions of ubuntu, debian, centos
and fedora instalations.

Change-Id: I94cff68de15d44f420e56c7793ed18476e07b442
2014-10-13 20:59:04 +00:00
Paul Van Eck
0ed9076d10 Handle non-zero exit codes from tempest script
Normally, catching a subprocess.CalledProcessError would suffice
since that exception is thrown when the subprocess exits with a
non-zero code. However this exception is only thrown when using
specific methods like check_output which we no longer use.

This commit now has us explicitly checking the process return code.

Change-Id: I799f92836fba41e718570e2f7affb27f11c26156
2014-10-02 13:09:34 -07:00
Paul Van Eck
768b4676a1 Refactor code and add more unit tests
Refactoring was done to make more of the methods easier to test.
Existing unit tests were adjusted/simplified and more tests were
added as a result.

Change-Id: I57c334c6a11fa8e12c88bdd0788d63a35cdfd7bc
2014-10-02 12:08:39 -07:00
Paul Van Eck
54a24f36a9 Add argument to disable data upload
Added an --offline argument which will prevent Tempest results
from being uploaded to the Refstack server if used.

Change-Id: I40df179288354a6eb7fac1d0ed634d722a780817
Story: https://storyboard.openstack.org/#!/story/190
2014-09-24 16:29:53 -07:00
sslypushenko
65538f145d Rename refstack-client to refstack_client
This renaming and change of project structure is necessary for adding
the unit tests.

Change-Id: I1893afbb05c86c83312983b12ce601d59a7fb417
2014-09-23 15:17:17 +03:00