- 06 10月, 2017 2 次提交
-
-
由 Cleber Rosa 提交于
Besides the obvious port, I reckon that using a more obvious fake return value for the return of `time.strftime` improves the legibility of the test. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
The context manager feature of mock.patch replaces a lot of the code that restores the original state. Besides that, one explicit assert was added to make sure that the non-patched state is what we expect. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 04 10月, 2017 1 次提交
-
-
由 Cleber Rosa 提交于
Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 22 8月, 2017 1 次提交
-
-
由 Cleber Rosa 提交于
The vast majority of selftests do not use CamelCase, but some still remain. Let's stick to a single naming pattern. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 14 8月, 2017 1 次提交
-
-
由 Paolo Bonzini 提交于
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 07 11月, 2016 1 次提交
-
-
由 Lukáš Doktor 提交于
Recent pylint update is more pedantic about module level spacing. There are no changes to code, only couple of extra spaces to make it happy. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 04 3月, 2016 2 次提交
-
-
由 Cleber Rosa 提交于
The configurations related to the "data_dir" are currently read at module load time. This means that changes in the configuration between module load time and changes to the settings (such as parsing an additional config file) is never seen. Since the avocado command line application parses extra configuration files (given with `--config`) after the module is loaded, these extra configuration files are never applied to the data_dir configuration. There's one more issue with regards to the the settings usage: because once references to the `settings` instance singleton are grabbed, they will always point to the same settings objects. The data_dir unittests exercise changes to the settings objects by replacing that instance. So, let's refer to the settings using the full location (module.attribute), which will always give back the "current" (be it original or replaced) settings instance. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
The current implementation of _get_bogus_settings() solves a partial need of the setUp() method. Let's combine both into a single (private) utility method (_get_temporary_dirs_mapping_and_config()) that can be re-used. The major goal is to re-use it when testing how data_dir reacts to changes in the settings at run time. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 08 10月, 2015 1 次提交
-
-
由 Lucas Meneghel Rodrigues 提交于
This is an automated mass import cleanup across all avocado source files: 1) Imports follow the order: * Standard library imports * Non standard library external imports * Internal imports All separated by a single line 2) One line between imports and the rest of the code 3) Remove unused imports in the process Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
-
- 05 10月, 2015 1 次提交
-
-
由 Lukáš Doktor 提交于
When one execute 2 jobs with first 7 chars of unique id at the same time, they end-up in the same logdir. This patch makes the creation safer. First it creates the main directory, then it tries to create the directory with 7 chars of the unique id. On failure it adds another char until it finds empty dir. In case you spawn 2 jobs with the same id at the same time, it adds a number starting with 0. If you spawn more tham 1000 jobs at the same time with the exact same id, it fails with IOError. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 30 9月, 2015 1 次提交
-
-
由 Lucas Meneghel Rodrigues 提交于
Make sure we have avocado_ + __name__ prefixes to the dirs created with tempfile, so that we have an easy way to spot when we are not cleaning up directories properly. This mostly concerns unittests, although the kernel_build lib and the iso9660 lib also uses that API. Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
-
- 03 9月, 2015 2 次提交
-
-
由 Cleber Rosa 提交于
Even though I may be the one to blame about coming up with this "simple import magic", I believe it was a mistake and we should get rid of them. There are a couple of other ways to actually do development out of of a source tree, including running unittests that do not require this amount of boiler plate code. Examples include just setting the PYTHONPATH environment variable to actually run (setuptools based) `python setup.py develop`. The little bits of what looks like the import magic that was left, is not really import magic. It's just that functional tests need to locate the Avocado source tree base directory to run the test runner from it. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
To be honest, our test code could still be kept in the same directories and have the same names. But I think we can improve two things here: 1) Flatten a little bit the directory structure of selftests. Two path components are being dropped here: "all" and "avocado". So that "selftests/all/functional/avocado" becomes simply "selftests/functional". 2) File names match what is, by default, recognized by unittest (the Standard Library module) based discovery of tests. That means that doc_build_test.py becomes test_doc_build.py. Not a big deal IMHO. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 31 7月, 2015 1 次提交
-
-
由 Lukáš Doktor 提交于
On multiple places we modify the sys.path to make avocado work from sources. Instead of `append` we should `insert` the path as when running from avocado sources directory, we want to use the modules from here, rather than from installed version. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
-
- 09 6月, 2015 2 次提交
-
-
由 Cleber Rosa 提交于
The avocado.settings module is not intended to be used by tests but by the framework itself. So, let's move it to avocado.core. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
由 Cleber Rosa 提交于
This is also a module that shouldn't be used directly by tests, as tests themselves have attributes with the right data directories already ready to use. So, let's move it to avocado.core. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 06 5月, 2015 1 次提交
-
-
由 Rudá Moura 提交于
Move avocado.core.data_dir to avocado.data_dir so that test developers can make use of it. Signed-off-by: NRudá Moura <rmoura@redhat.com>
-
- 14 4月, 2015 1 次提交
-
-
由 Lucas Meneghel Rodrigues 提交于
Use a try/finally block, when at the end of the test, we restore the old settings object to not mess around with the behavior of future unittests. Changes from v1: * Use a try/finally block instead of simply cleaning up, since if a bug/error happens, that cleanup wouldn't be executed, per ldoktor's comments. Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
-
- 18 2月, 2015 1 次提交
-
-
由 Lucas Meneghel Rodrigues 提交于
Clean up imports inside the avocado code tree. This does not bring any functional changes to avocado. Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
-
- 29 1月, 2015 1 次提交
-
-
由 Cleber Rosa 提交于
Self test files used to be executable, but that changed on 143b574c. So, it doesn't make much sense to keep the shebangs + python commands on them. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 10 1月, 2015 1 次提交
-
-
由 Lucas Meneghel Rodrigues 提交于
Strictly speaking, the test runner is a plugin just like any other, besides, what is being configured there is in fact datadir paths, hence the rename. Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
-
- 09 1月, 2015 1 次提交
-
-
由 Lucas Meneghel Rodrigues 提交于
Nosetest by default doesn't like executables, I find it useful when developing to see how nosetest executes our tests. Besides, it shouldn't modify the results of our custom made suite. Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
-
- 16 12月, 2014 1 次提交
-
-
由 Lucas Meneghel Rodrigues 提交于
Currently avocado uses /var/tmp/avocado as the default location for the avocado tmp dir. This is a bug from the security standpoint, since a malicious user could create a /var/tmp/avocado symlink pointing to an important directory of the system. So, instead of using /var/tmp/avocado, remove the ability to configure the base tmp directory (other than the traditional $TMPDIR environment variable), and make the data_dir.get_tmp_dir() API to return a safe, non predictable temporary directory. Recommended reading: https://kurt.seifried.org/2012/03/14/creating-temporary-files-securely/ http://www.linuxsecurity.com/content/view/115462/151/Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
-
- 11 12月, 2014 1 次提交
-
-
由 Lucas Meneghel Rodrigues 提交于
As discussed in the Trello card https://trello.com/c/WsDMg7RP/161-initial-support-for-avocado-config-files-server-and-client Move settings.ini to avocado.conf. The basic idea is that the name is more intuitive. Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
-
- 28 11月, 2014 1 次提交
-
-
由 Rudá Moura 提交于
Remove the license text from files inside docs, examples and selftest, to keep the license text only in relevant parts of the project. References: * https://fedoraproject.org/wiki/Packaging:LicensingGuidelines * https://www.gnu.org/licenses/gpl-howto.htmlSigned-off-by: NRudá Moura <rmoura@redhat.com>
-
- 15 5月, 2014 1 次提交
-
-
由 Lucas Meneghel Rodrigues 提交于
In order for people to run all avocado tests at once, move and reorganize tests under a directory called selftests. For someone to run all self tests in avocado, one would have to execute: selftests/run selftests/all This is a shortcut for developers. .travis.yml was also updated to run tests based on the new directory structure. Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
-
- 27 4月, 2014 1 次提交
-
-
由 Cleber Rosa 提交于
IMHO it looks a bit cleaner. Minor minor stuff though. Signed-off-by: NCleber Rosa <crosa@redhat.com>
-
- 26 4月, 2014 1 次提交
-
-
由 Lucas Meneghel Rodrigues 提交于
Add one meager unittest that verifies part of the intended behavior for the data_dir module. This unittest requires flexmock, that was added to the travis job in the previous commit. Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
-