Commit Graph

51 Commits

Author SHA1 Message Date
Zack Cerza
b8c443b44f Fix get_hash() arg ordering
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-07-16 12:07:55 -06:00
Zack Cerza
29c06f00d9 Add and use new fetch() method
The old fetch_branch() wasn't behaving properly with the ceph.com git
mirror. This method works with github.com and ceph.com. Add a couple
unit tests, and leave the old fetch_branch() in place for now, even
though nothing uses it.

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-07-15 12:02:32 -06:00
Zack Cerza
56ad957534 Be smarter about choosing branches
Part of this is also about failing sooner, and not allowing invalid
configurations to enter the queue. This commit also fixes an obscure bug
in substitute_placeholders(). Finally, it adds unit tests for all bugs
fixed.

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-07-14 14:30:31 -06:00
Zack Cerza
9547a7f398 Discourage modifying defaults in instances
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-07-11 10:41:16 -06:00
Zack Cerza
4a6352e372 Don't use double underscores
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-07-11 10:33:43 -06:00
Zack Cerza
a924606d26 Run tests for base class in subclass tests
Also remove test_defaults() since it was a bad idea.

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-07-11 09:55:34 -06:00
Zack Cerza
c886a93688 Make teuthology.config *far* more robust
In addition to parsing its configuration from a yaml file, it can now be
created from a dict. It can also be dumped as a dict, or as a yaml
stream. It is also now split into multiple classes so that the same
implementation can be used for job configs, and not just as a proxy for
~/.teuthology.yaml.

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-07-10 16:35:36 -06:00
Zack Cerza
70d87bda25 Update existing unit test, and add another.
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-07-10 16:35:36 -06:00
Zack Cerza
9e5338f887 Add test for config substitution
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-07-10 16:35:36 -06:00
Zack Cerza
3c3cdcb200 Don't execute network-using tests by default
Set TEST_ONLINE to use them.

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-07-10 12:32:02 -06:00
Zack Cerza
63fd33e4c1 Add another unit test
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-07-02 18:17:37 -06:00
Zack Cerza
71182fd86b Allow testing with online repos
It is not the default.

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-07-02 10:19:25 -06:00
Zack Cerza
cb7fdfb73f Add a unit test simulating simultaneous checkouts
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-07-02 10:08:48 -06:00
Zack Cerza
43c4595ae2 Add a couple unit tests for teuthology.parallel
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-07-02 10:08:11 -06:00
Zack Cerza
42a73500c0 Use a test-specific name/email for the git calls
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-07-01 10:56:41 -06:00
Zack Cerza
d6f1752897 Add more unit tests
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-07-01 10:42:16 -06:00
Zack Cerza
e431abd4aa Add a basic validation of the branch value
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-06-30 17:40:54 -06:00
Zack Cerza
bfd8226142 Run unit tests offline
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-06-30 17:23:20 -06:00
Zack Cerza
5a61f449d1 Split up repo helper into separate functions
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-06-30 10:10:31 -06:00
Zack Cerza
abd359086c Add unit tests for repo_utils
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-06-27 10:14:07 -06:00
Zack Cerza
667a223f03 Update unit tests to reflect renamed function
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-06-25 12:54:24 -06:00
Zack Cerza
b6cb3f8cb7 Add lots of unit tests for teuthology.suite
More to come...

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-06-25 12:54:23 -06:00
Zack Cerza
fc772d7354 Add a couple tests for teuthology.schedule
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-06-19 14:11:56 -04:00
Zack Cerza
d8c74392cd Add Pulpito links to teuthology emails
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-05-15 11:08:10 -05:00
Zack Cerza
73849c1179 Update safe_while's suggested usage pattern
I didn't love the way safe_while was encouraged to be used and it didn't
fit right with the new no-raising behavior. Now it's encouraged to be
used like this:

with safe_while() as proceed:
    while proceed():
        do_things()

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-03-08 15:19:31 -06:00
Zack Cerza
73f5af2f6a Add optional 'action' parameter to safe_while
This is to make it easier to see what actually timed out when scanning
error logs

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-03-07 14:02:33 -06:00
Zack Cerza
8258c8479b Change safe_while defaults to 6s 10x no increment
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-03-07 13:33:27 -06:00
Alfredo Deza
60892ca995 tests for the new while helper
Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
2014-02-24 16:21:58 -05:00
Sandon Van Ness
c0297b436a Changes suggested per review.
Signed-off-by: Sandon Van Ness <sandon@inktank.com>
2013-11-25 01:19:13 -08:00
Sandon Van Ness
c38eeec85f Allow ability to use multi machine type deliminated by ,- \t.
I was originally attempting a more complicated locking mechanism
but I think its almost as good to just have it attempt the other
machine type if one.

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
2013-11-21 14:19:44 -08:00
Sandon Van Ness
90161a371e Fixed errors. Tests pass.
Since the default OS version is different for each distro the
argument default is None instead of explicity set to a value
like with get_distro. Fixed some logic around that and the tests
making the arugment always take precidence.

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
2013-10-28 11:04:28 -07:00
Sandon Van Ness
d4a632df5f Support --os-version as argument.
You can use --os-type as an argument when not running teuthology
tests but instead just using teuthology-lock. This adds the ability
to also use --os-version so you can specify the version of the
distro without having to run an actual test with a yaml like you
normally would have had to do setting os_version in the yaml.

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
2013-10-25 17:48:50 -07:00
Zack Cerza
c31d747640 Fix broken logic in running_jobs_for_run()
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2013-10-16 13:43:05 -05:00
Zack Cerza
bac2965af6 ResultsSerializer.running_jobs_for_run() and test
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2013-10-14 16:34:45 -05:00
Zack Cerza
193b3112a3 Move teuthology-results' arg parsing to scripts/
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2013-10-10 19:09:34 -05:00
Zack Cerza
f78f3163c0 Add more tests for ReportSerializer
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2013-10-04 15:22:21 -05:00
Zack Cerza
e786e16220 Add test for test_all_runs
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2013-10-03 16:08:12 -05:00
Zack Cerza
93b6fa10a7 Clarify job vs. run
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2013-10-03 16:08:12 -05:00
Zack Cerza
f0604496e0 Create a FakeArchive class to forge test results
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2013-10-03 16:08:12 -05:00
Zack Cerza
589560e6c9 Port from nosetests to py.test
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2013-10-01 09:07:45 -05:00
Zack Cerza
f91f792c91 Add another config test
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2013-10-01 09:07:39 -05:00
Zack Cerza
4043c7d72c Split test into two 2013-09-24 10:09:04 -05:00
Zack Cerza
9de95d174f Add a basic test for teuthology.config 2013-09-20 15:11:13 -05:00
Zack Cerza
9ae29fa3bd Port to py.test 2013-09-19 15:55:38 -05:00
Zack Cerza
40907535fc Add test for teuthology.suite.build_email_body() 2013-09-19 15:36:33 -05:00
Zack Cerza
31f0f7ad7e Fix get_http_log_path(), update callers, add tests 2013-09-12 17:28:50 -05:00
Zack Cerza
725ba83c04 Add test for misc.get_http_log_path() 2013-09-11 14:49:15 -05:00
Sandon Van Ness
810cca1daf Added get_distro() to misc.py
Since getting the ostype is used multiple places I made a
function for it and modified the existing code to use
said function. I also added tests for the function.

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
2013-07-25 14:45:02 -07:00
Tommi Virtanen
a2372fce12 Move orchestra to teuthology.orchestra so there's just one top-level package. 2011-09-13 14:53:02 -07:00
Tommi Virtanen
4241185ad7 Add simple unit test for get_clients. 2011-08-09 13:40:56 -07:00