Er, ONE time I forget to run tests...
Details
Details
Diff Detail
Diff Detail
- Repository
- rLTRN libtaskotron
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
kparal | |
tflink | |
jskladan |
Er, ONE time I forget to run tests...
Run tests :)
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
Path | Packages | |||
---|---|---|---|---|
M | libtaskotron/config_defaults.py (1 line) | |||
M | testing/test_runner.py (2 lines) |
Commit | Tree | Parents | Author | Summary | Date |
---|---|---|---|---|---|
1371a92809d8 | d7c6e627c9ea | 410c2fe0c4d9 | Martin Krizek | Fix runner tests failing (Show More…) | Feb 20 2015, 1:46 PM |
Show First 20 Lines • Show All 90 Lines • ▼ Show 20 Line(s) | |||||
91 | class TestingConfig(Config): | 91 | class TestingConfig(Config): | ||
92 | '''Configuration for testing suite profile. Inherits values from | 92 | '''Configuration for testing suite profile. Inherits values from | ||
93 | :class:`Config` and overrides some. Read Config documentation.''' | 93 | :class:`Config` and overrides some. Read Config documentation.''' | ||
94 | 94 | | |||
95 | profile = ProfileName.TESTING #: | 95 | profile = ProfileName.TESTING #: | ||
96 | 96 | | |||
97 | tmpdir = '/var/tmp/taskotron-test/tmp' #: | 97 | tmpdir = '/var/tmp/taskotron-test/tmp' #: | ||
98 | logdir = '/var/tmp/taskotron-test/log' #: | 98 | logdir = '/var/tmp/taskotron-test/log' #: | ||
99 | artifactsdir = '/var/tmp/taskotron-test/artifacts' #: | ||||
99 | 100 | | |||
100 | log_level_stream = 'DEBUG' #: | 101 | log_level_stream = 'DEBUG' #: | ||
101 | log_level_file = 'DEBUG' #: | 102 | log_level_file = 'DEBUG' #: |
Show First 20 Lines • Show All 421 Lines • ▼ Show 20 Line(s) | |||||
422 | 422 | | |||
423 | 423 | | |||
424 | class TestRunnerCheckOverride(): | 424 | class TestRunnerCheckOverride(): | ||
425 | 425 | | |||
426 | def test_override_existing(self): | 426 | def test_override_existing(self): | ||
427 | ref_input = { 'arch': ['x86_64'], | 427 | ref_input = { 'arch': ['x86_64'], | ||
428 | 'type': 'koji_build', | 428 | 'type': 'koji_build', | ||
429 | 'item': 'foo-1.2-3.fc99', | 429 | 'item': 'foo-1.2-3.fc99', | ||
430 | 'uuid': '20150220_134110_955656', | ||||
430 | 'override': ["workdir='/some/dir/'"]} | 431 | 'override': ["workdir='/some/dir/'"]} | ||
431 | 432 | | |||
432 | ref_inputdata = runner.process_args(ref_input) | 433 | ref_inputdata = runner.process_args(ref_input) | ||
433 | 434 | | |||
434 | test_runner = runner.Runner(Dingus(), ref_inputdata) | 435 | test_runner = runner.Runner(Dingus(), ref_inputdata) | ||
435 | test_runner.do_actions = lambda: None | 436 | test_runner.do_actions = lambda: None | ||
436 | test_runner.run() | 437 | test_runner.run() | ||
437 | 438 | | |||
438 | assert test_runner.envdata['workdir'] == "/some/dir/" | 439 | assert test_runner.envdata['workdir'] == "/some/dir/" | ||
439 | 440 | | |||
440 | def test_override_nonexisting(self): | 441 | def test_override_nonexisting(self): | ||
441 | ref_input = { 'arch': ['x86_64'], | 442 | ref_input = { 'arch': ['x86_64'], | ||
442 | 'type': 'koji_build', | 443 | 'type': 'koji_build', | ||
443 | 'item': 'foo-1.2-3.fc99', | 444 | 'item': 'foo-1.2-3.fc99', | ||
445 | 'uuid': '20150220_134110_955656', | ||||
444 | 'override': ["friendship='is magic'"]} | 446 | 'override': ["friendship='is magic'"]} | ||
445 | 447 | | |||
446 | ref_inputdata = runner.process_args(ref_input) | 448 | ref_inputdata = runner.process_args(ref_input) | ||
447 | 449 | | |||
448 | test_runner = runner.Runner(Dingus(), ref_inputdata) | 450 | test_runner = runner.Runner(Dingus(), ref_inputdata) | ||
449 | test_runner.do_actions = lambda: None | 451 | test_runner.do_actions = lambda: None | ||
450 | test_runner.run() | 452 | test_runner.run() | ||
451 | 453 | | |||
452 | assert test_runner.envdata['friendship'] == "is magic" | 454 | assert test_runner.envdata['friendship'] == "is magic" |