tests.conftest¶
conftest.py
Global configuration for test suites`
tests.examples.logger_usage¶
tests.examples.logger_usage.test_logger¶
test_logger.py
Logger functionality demo test suite
Notes
HowTo:
This test module need to connect to some linux host. Update the following configuration files with proper ssh credentials:
$ cat environment.json
[
{"name": "Localhost1", "entry_type": "linux_host", "instance_type": "generic", "id": 999,
"ipaddr": "localhost", "ssh_user": "your_user", "ssh_pass": "your_password",
"ports": ["lo"]
}
]
$ cat setup.json
{
"env": [
{"id": 999}
],
"cross": {}
}
Now you can launch it:
$ cd taf/tests
$ py.test --loglevel=DEBUG --env=path/to/environment.json --setup_file=path/to/setup.json --call_check=fast examples/logger_usage/test_logger.py
--logdir=path/to/logdir
Notes
–logdir is mandatory option to check sshlog functionality. If you don’t set logdir only stdout logger will be configured.