Commit Graph

82 Commits

Author SHA1 Message Date
Andreas Jaeger 8c881bcbe5 Retire repository
See
http://lists.openstack.org/pipermail/openstack-discuss/2019-July/007708.html

Change-Id: If97f10290c16903d550c66163b082bd23357fca2
2020-05-08 13:51:25 +02:00
Michael Dong 8930d98a26 Custom root configuration option
Instead of syntribos taking in ``--custom_install_root` during init and
``--syntribos-custom_root`` during run, which sometimes led to the custom root
option not being set correctly, the redundant config options have been
deprecated.

Change-Id: I95f4d345fe8a8608ff6d1daaf06ff49912917a3f
2018-12-10 16:03:19 -06:00
Michael Dong 6cf7bdab87 Bug fixes and error message updates
Fixes:
1) Crashes in runner and file_utils
2) Binary strings being read in as payloads

Updates:
1) Clarified error messages in parser
2) Confusing variable names in test cases vs issues

Adds:
1) A `syntribos root` CLI sub command to display the current syntribos root dir

Change-Id: I22edf7a1f3d39724522aee88d08b00d299b67248
2018-11-28 12:32:24 -06:00
Michael Dong a6db29dc7c Bug fixes related to python 3 changes
Change-Id: I048bb19cf456281521883eb1500832343d72fb97
2018-10-18 14:39:59 -05:00
Michael Dong feb3a59c95 YAML support, basicauth extension, bugfixes
1) Allows for YAML body in request templates. If a content-type
    is specified for a request template, Syntribos will validate the
    body against the header. This is to prevent templates from silently
    failing to parse and sending unintended data to the target.
 2) Added extension to support basicauth
 3) Lowered confidence ratings for various tests

Change-Id: I672b0e0aa3da1aa6dd7e9a8456da73f0a15759b7
2018-10-09 15:55:53 -05:00
Michael Dong c4586a374b Improve performance by multithreading test calls
This change:
1) rewrites the runner to spawn a thread pool for each template
   and assigns a worker for each test case
2) makes the output colorized by default
3) makes minor changes to the output

Change-Id: I49906f5daaa339ca9429913680203c762a0ad9fe
2017-09-18 13:23:00 -05:00
Ngo Quoc Cuong 1f1b7be594 Remove translation of log messages
The i18n team has decided not to translate the logs because it
seems like it not very useful; operators prefer to have them in
English so that they can search for those strings on the internet.

Change-Id: I84b1a2397f424430ed332aa7d4d874379abd0357
2017-06-16 15:42:45 +07:00
Michael Dong 1493f0f3b9 Fixed errors printing in scientific notation
Change-Id: I23ac487703942630d4c4ff8f4f7b826fba3a75fc
2017-03-15 17:00:43 -05:00
Vinay Potluri c300ca8313 Fixing nits in i18n patch
Running syntribos throws an error due to nits in the i18n
patch. This patch fixes the errors in runner.py and result.py.

Change-Id: Ic1c041f586e4f556fd1c1e30b6dc3f3dcd0284fe
2017-03-14 14:18:39 -05:00
Michael Dong 5d7771fb8e Added meta variable support to runner
The runner will now respect inheritence when passing meta variables
to the parser.

Change-Id: I84ae827fcb396a1cb701d212601a8dcd56a37d9e
2017-03-13 14:43:49 -05:00
Rahul Nair 38eb9f2a77 Adding i18n support to Syntribos
Adding i18n support to syntribos log messages and prompts.

Change-Id: If9914447ccbf3ac2f9c88c3460756f4b682630ec
2017-03-13 01:51:50 -05:00
Michael Dong c5a4dd083d Added support for meta variable JSON files
Syntribos now allows the user to specify variables in their request
templates by reading from a meta.json file. This is part 1 of 3 of
the full effort, dealing primarily with the template parser itself.

Change-Id: Id41d331f595cd3bc32f085ef49cb5d1b16779a5c
2017-01-27 11:03:39 -06:00
Vinay Potluri 5664f99a4b Improving readibility of code
Changing six.iteritems(kwargs) to kwargs.items() to improve
readability of code and reduce the use of python package six

Change-Id: I7460c0274b790efcd53ee9d1c0bc538effb950dd
2017-01-25 14:25:54 -06:00
Rahul Nair 6eb64af8b5 Updated pylint rules
Fixed few `issues` as stated by pylint to pass the new linter
rules.

Change-Id: I8ffeff7125a1fda367a9cefa1a3d3cfcbadd37d0
2017-01-23 15:07:27 -06:00
Michael Dong ebfd5728cd Added documentation for template file naming requirements
Our docs and logs did not say that template files have to be named
".template" anywhere

Change-Id: Ieea6e3d7fa92b585a2f556acbc60b5eb962d6bbd
2017-01-20 16:58:55 -06:00
Rahul Nair 94d0205b8e Pylint changes update
Updated the enabled tests and edited set of files to pass present
enabled tests.

Change-Id: I369166bacbd816b4d85732d476158468ed271d49
2016-11-22 16:10:50 -06:00
Jenkins 1c973b4646 Merge "Adding pylint check to syntribos" 2016-11-22 17:35:59 +00:00
Rahul Nair 8aae08f39f Adding pylint check to syntribos
Adding pylint check to syntribos and updating few files to
make the files compliant.

Change-Id: I1970a0351fec1d8898a15e4433a5dbe161df0168
2016-11-21 18:11:06 -06:00
Rahul Nair d44f0e58d6 Better exception messages
Messages displayed for some exceptions are too vague and have
stack traces, cleaning up a few messages and the way they are
handled.

Change-Id: I7b134844e8a9cfa21a119cd5b5b6c37871d0381a
2016-11-21 20:06:59 +00:00
michael.dong@rackspace.com 55ef06d45e Added pause/resume feature
KeyboardInterrupt now pauses the runner. From there, the user can
Ctrl-C again or type "quit" to stop execution, or press ENTER to continue.

Change-Id: Ib0384bbd06c248ba0f5dd61cfa16c8c3aaea975e
2016-11-01 14:33:22 -05:00
michael.dong@rackspace.com 46d5ba400b Introduced payload and template downloading
Syntribos now downloads payloads as part of the initialization process, and
also can download payloads and templates as part of the 'syntribos download'
command.

Change-Id: I17501535e5fd341c2705e07e3797643dc2d4a7df
2016-10-28 14:42:12 -05:00
Charles Neill 65aa87a93b Fixing ordering of Runner.run and version bump
Change-Id: I034f63f834a79d881c1e539ebda9c315d682962e
2016-10-26 21:55:08 -05:00
Charles Neill 18781c37cd Add additional runner and env utils tests
Adds several tests to exercise more of runner and the env utils.

Makes several modifications to config.py, runner.py, and utils/env.py,
with the aim of making them more testable.

Change-Id: I708df9e5315f3dadd028c8107ac6416c707e90a0
Closes-Bug: #1634296
2016-10-26 19:43:33 -05:00
Charles Neill dabac296a7 Creates syntribos 'init' command
This command will set up the basics needed for a syntribos environment
(i.e. template folder, payload folder, log folder, default config file)

Some modifications have also been made to Runner to facilitate these
changes. These changes will (hopefully) allow us to better unit test
components of the runner.

Change-Id: I001e798b89539468cfbd92d5df301f7e59f1f33d
2016-10-26 17:44:15 -05:00
Rahul Nair 8faed09ebe Fixing unicode error
When syntribos attempts to download templates, it fails with
unicode error. This patch fixes it.

Closes-Bug: #1636609

Change-Id: Id62e9ed70d1b4501fe531587947c1f6d88bf034a
2016-10-26 17:33:27 -05:00
Rahul Nair b7b925cf4d Loading payload from remote URI
POC on loading payloads using remote URI. This is part of a larger
effort in packaging syntribos to ensure that the project would
work without much configuration post install from pypi.

Change-Id: Id61e840d4f49d5b6deb72bce2e8bcc0e1096fa52
2016-10-25 10:28:25 -05:00
michael.dong@rackspace.com a82694d53c Modified dry_run to run debug test
Wrote empty debug test as a replacement for dry_run. dry_run no longer executes
any test code, or send any requests. Rather, it serves only to check that the
template file and all external calls inside the template are parsed and run
correctly.

Change-Id: I1cd817476c9ca4bd27b013dcdbd0cbce334847c4
2016-10-21 00:07:57 +00:00
Jenkins aa50d7b7d0 Merge "Adding python 3 compatibility and some minor styling changes" 2016-10-15 00:25:53 +00:00
Rahul Nair 5911450992 Adding python 3 compatibility and some minor styling changes
As we are moving to the next iteration of the project for Ocata,
I think it would be helpul to makesure that the codebase is
fully compatible in py27 and in py35. Also, some minor styling
changes, removing uncessary spaces etc.

Change-Id: I9aac07dc180cd3a7c7885661bdad985c183ae0a9
2016-10-14 17:39:29 -05:00
Rahul Nair 7788966a78 Minor modifications to the doc string and a few styling changes
Doc strings for 2 methods modified to reflect accurate info.
Fixes a bug in dry_run; dry_run should not send requests.
Also, making a few styling changes.

Change-Id: I6fc64adae8c38e3ab834068696ca6693a653992e
2016-10-12 14:55:28 -05:00
Jenkins e9df59d322 Merge "Fixed bug where CLI failure counts were cumulutive" 2016-08-30 23:28:46 +00:00
Rahul Nair de0bbf3d0c Fixing bug in logger
Logger issues stacktrace if templates are store in subdirs,
this changes fixes it.

Change-Id: I2ca350ea4a2a1d69624a9a7d1365871dc7ec0950
2016-08-30 17:42:44 -05:00
michael.dong@rackspace.com 85fe41332b Fixed bug where CLI failure counts were cumulutive
Change-Id: If31d6758709e8d0d8e581a6544e8d6bf6fcff37d
2016-08-30 14:28:17 -05:00
Jenkins 094625fe9a Merge "Fixed runner time log" 2016-08-30 17:45:54 +00:00
michael.dong@rackspace.com 61b144ff21 Fixed runner time log
Change-Id: I6901354b73dc635bf5fa164774267eb5ee482420
2016-08-30 00:49:55 -05:00
Jenkins 062412da01 Merge "Modifying log file path" 2016-08-29 23:22:09 +00:00
Jenkins 7ed156b0d9 Merge "Minor nit in progress display" 2016-08-29 23:17:34 +00:00
Rahul Nair f8a90755dc Minor nit in progress display
Some terminals does not display unicode correctly thus changing
progress character to a `#` and also fixing some minor nits in
progress display.

Change-Id: Id604ab9f646b1e846faabf9003ecb1a702a17313
2016-08-29 18:05:52 -05:00
Rahul Nair 38a6dc1d2e Modifying log file path
Modifying debug log file path so that logs are saved per template.

Change-Id: I24614944358377a2f7a6465491e9bbad048b9230
2016-08-29 16:42:37 -05:00
michael.dong@rackspace.com adca69a272 Revamped results schema
Results are now formatted in the schema as defined here:
https://gist.github.com/cneill/a511451284a0c5f33295477150bd94d4

Furthermore, the json formatter is no longer responsible for the aggregation
of issues. Instead, this logic has been moved to the IssueTestResult class

Change-Id: Id39e122b2b4c1c9cafab09fdbc5d172dec012d22
2016-08-29 15:40:02 -05:00
michael.dong@rackspace.com e442dc8f6d changes to runner and result
1) results are now printed at the end of the run or on interrupt, not after
every template
2) made test_id's globally unique
3) print number of errors next to number of failures
4) number of failures printed after next to each progress bar and reported
in total at end of run now match up

Change-Id: I28617c64218ab632c1a35083ef9351874054a26d
2016-08-25 14:37:06 -05:00
Jenkins 3b6464b712 Merge "Fixes a bug in "excluded tests"" 2016-08-24 23:25:58 +00:00
Rahul Nair 1615bb7068 Fixed a trivial bug in keyboard interrupt part
The method name was not changed, fixing that.

Change-Id: I0f377993f2471e1df8b05bee39fcfd13b5c6ebfd
2016-08-23 18:10:51 -05:00
michael.dong@rackspace.com be1cd5ce91 Minor changes to runner and templates
1) Runner now only considers .template files
    1b) renamed all template files
    1c) fixed broken keystone template files
2) moved print_log() out of print_result()
3) fixed "ran x tests in x seconds" stats

Change-Id: I4600e5e154b5d3c951a08375a15904ea42621075
2016-08-22 12:30:18 -05:00
Rahul Nair 41e27a2780 Fixed a bug in runner
There was a bug in runner in the string formatting.
This fixes it

Change-Id: Iac8a671b7ef550bf326baa136b0aef5b35b39180
2016-08-16 23:23:40 -05:00
Rahul Nair d3123057c3 Adding sub commands to Syntribos
This change adds some commands to syntribos

sub commands:

- list_tests
- run
- dry_run

Also, refactoring runner.py and added utils/cli.py
to add all utility methods used for cli output.
Change-Id: Ieed2e06e0fb6eec34be640ae1db86785403546df
2016-08-16 16:15:14 -05:00
Charles Neill 43275bb1fb Fixes a bug in "excluded tests"
When specifying multiple test types to exclude, the "get_tests" method
in runner would only honor the first exclusion even if more than one
was specified. This patch allows multiple exclusion flags to be honored,
and adds unit tests to ensure it functions as expected.

Closes-Bug: #1612338
Change-Id: Ibbbc0ae27a7c5f2ce8e0f3e68f9b04aef72b8cdf
2016-08-11 11:28:20 -05:00
Rahul Nair 0009bf49ce Adding unique_id to tests
Adding a simple counter based id to tests to track them in debug
log and results log. Also, this patch improves the result output
like adding a progress bar and uniform test names..

Change-Id: Ib83181b25a0c18c7993f491cde98d73555b01404
2016-08-04 20:22:17 +00:00
Jenkins fc1c207040 Merge "Adding additional fields to debug log" 2016-08-04 16:07:31 +00:00
Charles Neill a5f73ad6ad Logs config options in debug log
This adds a *very* simple change to start capturing the values of
config options from the Runner in the debug log.

Change-Id: Id5872ed9f31a55beb820328ce945e136a9853d7a
2016-08-03 16:25:57 -05:00