aboutsummaryrefslogtreecommitdiffstats
path: root/tests/report_tests
Commit message (Collapse)AuthorAgeFilesLines
* [pylint] pylint and flake8 updatesArif Ali2024-05-031-2/+1
| | | | | | | | | | | | | | pylint for the following rules applied * C0411: wrong-import-order * R0912: too-many-branches * R0914: too-many-locals * R1725: super-with-arguments * E1101: no-member Resolves: #3597 Signed-off-by: Arif Ali <arif.ali@canonical.com>
* [pylint] Convert all tests to f-stringsArif Ali2024-05-024-7/+7
| | | | Signed-off-by: Arif Ali <arif.ali@canonical.com>
* [tests] Add some tests for netplan and jujuArif Ali2024-05-014-1/+305
| | | | Signed-off-by: Arif Ali <arif.ali@canonical.com>
* [testing] Add most testing via tox.iniArif Ali2024-04-1218-43/+90
| | | | | | | | | | | | | | | | | Consolidate testing, so that things can be run from CLI, CI and various other means in a consistent way by using tox. * Updated all the flake8 tests in the tests folder. * Added pylint as a neutral test so that we can work on this in stages and have some collaboration on what we test and don't * The tox tests for unit, stageone, stagetwo testing makes is easier for users to know how to run tests, and not have to do things manually * Using tox for CI doesn't make sense, as that will create virtual envs and will disregard system/snap based python modules so may not work Signed-off-by: Arif Ali <arif.ali@canonical.com>
* [cirrus] Run tests on latest daily builds for ubuntuArif Ali2024-04-094-10/+11
| | | | | | | | | | | | Fix the issues reported by the tests on the new version of ubuntu Resolves: #3587 Closes: #3588 Related: SET-594,SET-595 Co-authored-by: David Negreira <david.negreira@canonical.com> Signed-off-by: Arif Ali <arif.ali@canonical.com> Signed-off-by: David Negreira <david.negreira@canonical.com>
* [tests] Drop obsolete TestCase.assertEquals()Martin Pitt2024-01-101-5/+5
| | | | | | | | | | `unittest.TestCase.assertEquals()` was deprecated in Python 3 [1], and finally dropped in Python 3.12. This now causes the unit tests to fail [2]. [1] https://docs.python.org/3.5/library/unittest.html#deprecated-aliases [2] https://bugs.debian.org/1058214 Signed-off-by: Martin Pitt <mpitt@debian.org>
* [tests] Make options_tests faster by calling them on a few plugins onlyPavel Moravec2023-06-272-4/+4
| | | | | | | | | | | | | options_tests.py tests -n option which means tens of plugins are redundantly collected. Testing -o option is effectively the same while the sosreport run needs a half time only. The functionality of -n option is tested elsewhere, thus the change does not shrink test coverage. Resolves: #3288 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [tests] Skip /sys/class/net/bonding_* from netdevsPavel Moravec2023-03-291-3/+6
| | | | | | | | | | | Avocado tests generate netdevs by listing /sys/class/net which can contain also bonding_masters that does not refer to any netdev. In such a case, the test case fails. Resolves: #3176 Closes: #3178 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [report] Allow users to constrain sos process priorityJake Hunsaker2023-03-071-0/+33
| | | | | | | | | | | | | | Adds a new `--low-priority` option to report, which will attempt to constrain the process priority for the report generation. We do this by attempting to set ourselves to an 'idle' IO class, as well as setting our niceness to 19 to avoid contending for CPU time. This is also exposed via `sos collect`, however users should note that this will not be effective until the sos-4.5.1 release. Closes: #3127 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [report,plugin] Control journal size separate from log-sizeJake Hunsaker2023-03-021-14/+13
| | | | | | | | | | | | | | | Historically, journal sizes have been limited to the *higher* of 100MB or `--log-size`. While this had the benefit of potentially controlling both logs and journals with the same option, it was not immediately intuitive to end users and downright prevented collecting less than 100MB of journals. Address this by separating journal size limiting from `--log-size` by adding a new `--journal-size` option (default 100). This will allow users to individually control journal sizes without any "gotcha" scenarios with relation to general log size limiting. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [tests] Add version consistency testJake Hunsaker2023-02-171-2/+12
| | | | | | | | | | Commits a downstream test from RHEL to ensure that a given release has a consistent version string in the UI report, manifest, and most importantly for the package nvr for an sos package built from the current branch. Note that this test is only implemented for RPM installations at this time. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [testing] Change location of mocked files for testsJake Hunsaker2023-01-1210-4/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, mocked files were kept under the `tests/test_data/` directory and generally mimic'd the file location they would be temporarily copied to during the execution of their relevant tests. This has a few maintainability drawbacks, and the handling of the `files` attribute for test cases as either strings or tuples is at best confusing. Improve on this by instead making the `files` references relative to where the test case file is written. This enables easier maintenance by keeping all test requirements closer together, rather than spread across the repo. As such, the `files` attribute now requires a list of tuples, taking the form `(relative_src, absolute_dest)`. Additionally, fake plugins for tests that need them to artificially test a specific criteria should also be included in the test's subdir now. Along with this change, move several StageTwo tests to their own subdirs that now contain both the test cases and the needed files for mocking. This should be the new design pattern going forward - if a test needs to mock files of any kind, put it in a new subdirectory (and if it doesn't need to mock files, continue to keep it in the relevant directory within the test suite). Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [report,Plugin] Add a tag summary to report manifestJake Hunsaker2022-10-242-2/+11
| | | | | | | | | | | | | | | | | After all plugins have run, sos will now generate a "tag summary" and add it to the report section of the manifest. This summary will be a json-formatted entry that details all collections within the report that have any tag associated with them at all. This should allow for easier parsing of the manifest by analyzers such as Red Hat Insights. As part of this change, commands will no longer be automatically tagged with the name of the binary used in the command collection. Additionally, manual collections performed by a plugin's `collect()` method will now be recorded in the manifest in the same manner as file and command output collections. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [krb5] Enable on Ubuntu/Debian, expand package tupleJake Hunsaker2022-10-101-0/+39
| | | | | | | | | | | | | | It was found that the `krb5` plugin was not executing on Ubuntu/Debian systems due to a legacy change that inadvertently removed support for those distributions. Re-enable support by defining a new plugin class for those distros, setting the kdc directory appropriately. Additionally, expand the package tuple to include newer package names. Closes: #3041 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [process,PackageManager] Create a mapping of processes to packagesJake Hunsaker2022-09-281-1/+1
| | | | | | | | | | | Adds a new manual collection to the `process` plugin, that tries to compile a mapping of running processes' binaries to an owning package via the package manager. As such, package managers now have a new `pkg_by_path()` method that serves this purpose. Closes: #1350 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [Plugin] Allow for manual collections during collect phaseJake Hunsaker2022-09-281-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Historically, sos has limited collections to existing files and command output. While there have been many reasons for this, there have also been several exceptions made to current plugins as well as ongoing requests for data that is not currently provided via existing commands. As sos evolves, it should in turn be more capable to provide diagnostic data beyond what is strictly available via command outputs. As such, add a new step to the collection phase that allows plugins to perform these manual data collections. Plugins may now define their own `collect()` method to do so, thus moving the existing exceptions out of `setup()` phase execution. To aide in writing these collections to the plugin directory, a new `collection_file()` generator has been added which will handle creating, managing, and closing the new file so that plugins only need to be concerned with the content being written to such files. Plugin contributors should note that these manual collections are executed at the end of the collection phase - meaning they are more likely to be skipped or interrupted due to plugin timeouts. Closes: #2992 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [cirrus] Update Fedora images used in CI testsJake Hunsaker2022-08-311-1/+1
| | | | | | | | The Fedora 36 image is now available on GCP, so update our testing matrix to use it. Accordingly, this means we no longer need to build or maintain our own Fedora images going forward. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [tests] Allow test suite to use locally installed sosJake Hunsaker2022-08-291-2/+2
| | | | | | | | | | | | | | | Up until now, the test suite was forced to be run using the git checkout. While this is useful for on-the-fly testing, it does miss an important use case of building a test package from the checkout, and running it using that as the system installation of sos. This commit allows the use of an installed version of sos to test against. This may be leveraged by adding `-p TESTLOCAL=true` in the `avocado run` command used to launch the test suite. Setting this parameter to any other value, or omitting it entirely, will continue the current behavior or using the git checkout for running tests. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [teamd,tests] Add a test for teamd plugin and device enumerationJake Hunsaker2022-08-101-0/+46
| | | | | | | | | | | | | Adds a new test case for the `teamd` plugin that also inherently acts to test team device enumeration. Included with this test case is an addition to the base test classes that allows for tests to define a `post_test_tear_down()` method that will be run at the end of each test execution to allow for manual cleanup - in this case deleting a 'fake' team device created for the test. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [tests] Update networking test in suiteJake Hunsaker2022-07-251-0/+7
| | | | | Adds a new test to the networking plugin test to ensure we iterate correctly over network devices.
* [logs] Drop catalog from `this` and `last` bootJake Hunsaker2022-07-061-1/+1
| | | | | | | | | Removes catalog entries from the journal collection for `this` and `last` boot collections. Closes: #2132 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [Plugin] Allow plugins to define default command environment varsJake Hunsaker2022-03-251-0/+44
| | | | | | | | | | | Adds the ability for plugins to define a default set of environment vars to pass to all commands executed by the plugin. This may be done either via the new `set_default_cmd_environment()` or `add_default_cmd_environment()` methods. The former will override any previously set values, whereas the latter will add/update/modify any existing values. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [tests] Add a test for non-default plugin_timeout complianceJake Hunsaker2022-03-021-1/+26
| | | | | | | | | | | | | | | | | | | | There was a gap in our testing that allows #2863 to escape our notice - that a `Plugin()`'s `plugin_timeout` attribute would be ignored if it wasn't set to `TIMEOUT_DEFAULT`. As that was resolved by #2864, add a test to ensure it remains working as expected. The expected resolution order for a plugin's whole timeout is as follows: 1. The value set by `-k plugin.timeout` 2. The value set by `--plugin-timeout` 3. The value hardcoded in the plugin via the `plugin_timeout` attr 4. `TIMEOUT_DEFAULT` Related: #2863 Related: #2864 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [tests] Increase stagetwo log test timeoutJake Hunsaker2021-10-181-0/+1
| | | | | | | | | | | As an interim stopgap measure, increase the timeout for the stagetwo `logs` test to allow for more time for handling random data generation and logging, until we're able to define a better/more efficient way to generate this data within the test suite. Related: #2700 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [tests] Enable verbosity by default for all testsJake Hunsaker2021-10-182-2/+2
| | | | | | | | | | The debug level messages gated by `-v` are very helpful for diagnosing test failures, but currently not all tests specify the use of verbosity. Make use of verobsity a default parameter for all test runs to address this. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [Plugin] Improve add_string_as_file collection and manifest recordingJake Hunsaker2021-09-172-0/+43
| | | | | | | | | | | | | | | | | | | This commit allows plugins that call `add_string_as_file` to specify if the string should be written to `sos_strings/$name/` (current behavior) or if it should be written to `sos_commands/$name/` which may be desireable for organizational purposes for plugin collections. `add_string_as_file()` has also been updated to write to a plugin's manifest section for any files written this way. Accordingly, the method will now accept a `tags` parameter to add specified tags to the manifest entry. Certain plugins directly calling this method have been updated, but the existing logic to write truncated data to `sos_strings/` remains untouched, and will not generate manifest entries (as those should already be handled by the method that trigged the truncated collection). Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [tests] Add tests for proper handling and logging of conf file optionsJake Hunsaker2021-09-081-0/+45
| | | | | | | Adds a new report test that ensures that options set in `sos.conf` are picked up, handled properly, and logged as we expect them to be. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [tests] Move report_with_mask tests to cleaner_tests directoryJake Hunsaker2021-06-221-109/+0
| | | | | | | | Moves the report_with_mask tests to be under the cleaner_tests/ directory. No changes are actually being made to the tests, this is an organization change. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [tests] Add tests to ensure help outputJake Hunsaker2021-06-221-0/+51
| | | | | | | | | | | | | In the past, there have been otherwise trivial typos and the like that have caused `--help` output to be unreliable. In the case of "help options" such as `--list-plugins` this also includes potentially unavailable detailed information about whatever is being listed. These tests are sanity checks to ensure that changes aren't regressing this behavior and that the informational output options, and `--help` directly, continue to provide the right output. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [cleaner] Remove binary files by defaultJake Hunsaker2021-06-151-1/+41
| | | | | | | | | | | | | | | | | | Binary files generally speaking cannot be obfuscated, and as such we should remove them from archives being obfuscated by default so that sensitive data is not mistakenly included in an obfuscated archive. This commits adds a new `--keep-binary-files` option that if used will keep any encountered binary files in the final archive. The default option of `false` will ensure that encountered binary files are removed. The number of removed binary files per archive is reported when obfuscation is completed for that archive. Closes: #2478 Resolves: #2524 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [Plugin] Add default journal collection for Plugin servicesJake Hunsaker2021-06-141-0/+42
| | | | | | | | | | | | | | | | | Adds automatic collection of journals for any service defined in a plugin's `services` tuple, if that service exists on the system. Updates several plugins to define a `services` tuple in place of manually calling `add_journal()` (and as a bonus, removing redundant `add_service_status()` calls that are already performed based on the tuple). Additionally, add an appropriate tag to each `add_journal` call for easier collection lookup in the manifest. Resolves: #2579 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [tests] Add test for using `--encrypt-pass`Jake Hunsaker2021-06-031-0/+51
| | | | | | | | | | Adds two test cases for using `--encrypt-pass`; one with just the bare option and another in conjunction with `--clean` to ensure both can be used in the same execution. Resolves: #2566 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [tests] Improve failed command reporting in test outputJake Hunsaker2021-05-262-2/+2
| | | | | | | | | | | | | | | | | | | | Improves error reporting for failed sos commands by logging stderr (or stdout if stderr is not populated) to the console, which was previously being truncated by the builtin error handling of avocado. Printed output is limited to the last 8k to avoid dumping several MBs at a time for scenarios such as timeouts where command failure may generate significant logging prior to failing. Included with this are 2 minor changes to existing tests. First, remove verbose output from the expected plugins test to reduce otherwise irrelevant output for command failures. Second limit the number of plugins run for the LogLevelTest, both to reduce overall run time for a test where we aren't testing specific plugins and to improve readability of failures for such a test. Resolves: #2556 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [tests] Add test for priority parameter in add_cmd_output()Jake Hunsaker2021-05-241-0/+54
| | | | | | | | | Adds a test that checks that the new `priority` parameter is working as expected for well known and common collections. Resolves: #2553 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [report] Do not fail on skipping non-existing pluginsJake Hunsaker2021-05-181-1/+12
| | | | | | | | | | | | | | | | | | | Specifying a non-existing plugin to skip is no longer considered a fatal error. This was previously in place, in part, for third party utilities calling sos to ensure adherence to known plugins. However, since `collect` has been integrated into sos natively, this is far less of a concern. Specfying non-existing plugins will now only generate a warning message for plugins wanting to be skipped (`-n`). If non-existing plugins are specified for enablement via `-e` or `-o`, that will still generate a fatal error. Closes: #537 Closes: #1723 Resolves: #2517 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [archive] Don't shell out for compressing the archiveJake Hunsaker2021-05-121-0/+35
| | | | | | | | | | As sos is now python3-only, we can avoid shelling-out to compression utilities like `xz` or `gzip`, and instead use the method provided by the built-in `tarfile` module. Resolves: #2523 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [tests|logs] Stream test data to journal, change inspected journalJake Hunsaker2021-05-051-9/+13
| | | | | | | | | | | | Changes the logs pre_sos_setup() to write to the journal using a stream rather than writing several MB directly all at once. This fixes an issue where using the `journal.send()` method from the systemd module would result in no data being written to the journal during the test setup. Second, switch over to inspecting the full journal rather than the most recent boot journal. Related: #2499
* [tests] Correct test package installationJake Hunsaker2021-05-051-7/+6
| | | | | | | | | | | | | | | | First, correct the logs plugin stagetwo test to specify the needed package in a list, and second move the import to within the test class that needs it so that we don't fail on the stageone tests if the package is not present. Second, correct the journal injections that this plugin test does to use `pre_sos_setup()` instead of overriding `setup_mocking()`, and call the former after the mocking has been setup. Finally, add the resulting size of the collected journal if we fail the size requirements of the test. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [tests] Add test class for when exceptions are expected in an executionJake Hunsaker2021-05-031-0/+43
| | | | | | | | | | | | | | Adds a new `StageOneReportExceptionTest` class that is to be used for tests that should ensure an exception IS hit, for example when testing plugin enablement or invalid options. Included with this commit is a small set of plugin enablement tests. Future tests for component and plugin specific exception handling should be built using this class and design approach. Resolves: #2518 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [Plugin] Make command output size limiting obviousJake Hunsaker2021-04-301-0/+4
| | | | | | | | | | | | | | | | | | | | | When command output is size limited it should be made obvious that it is not the whole output of the command, beyond the collected output (most likely) starting in the middle of a string. To do this, we add a 'truncated' key to the results dict returned by `sos_get_command_output()`, which is set based on if the `AsyncReader` was filled during command execution. From that, first log if a command was truncated. Second, instead of dropping the collected output in the normal plugin directory, instead drop it into `sos_strings` with a `.tailed` extention to mimic how we handled tailed file collections. Finally, add a symlink from the plugin dir with the original filename that points to the `sos_strings` path. Closes: #1332 Resolves: #2506 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [logging] Fix archive debug logging, adjust verbosity levelsJake Hunsaker2021-04-281-1/+20
| | | | | | | | | | | | | | | | | Fixes an issue where archive debug logging was controlled by the use of `--debug` rather than `--verbose`. Removes a superfluous log in `FileCacheArchive.add_link()`. Also, adjusts the different verbosity levels to be more meaninful. Now, the use of `-v` will enable debug logging but will not print those messages to console, `-vv` will print debug logging to console, while `-vvv` will enable archive debug logging which is expected to be significant due to most file operations being logging at some point with archive debug logging. Resolves: #2507 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [process] Collect per-process files from /procJake Hunsaker2021-04-161-0/+29
| | | | | | | | | | | | | | | | | | | | Adds collection of per-process files from /proc/$pid, limited to a number of pids controlled by the new `process.numprocs` option. This option will default to the first 2048 processes. Using a value of `0` for this option will result in all pids being collected. In testing, the initial limit of 2048 process did not significantly raise collection time or archive size. Note however, that collection of 20k or more processes does show a significant increase in plugin execution time and archive size. This is however tempered, by the whole-plugin timeout that sos imposes. Related: #436 Closes: #542 Resolves: #1783 Resolves: #2498 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [tests] Add a test for default expected plugin enablementJake Hunsaker2021-04-151-1/+56
| | | | | | | | | | | | | | | | Adds a test case to ensure that the plugins we can expect to always be enabled when a "normal" `sos report` command is run are in fact enabled. First, test the distro-independent plugins that do not have specific enablement triggers (and thus should always be enabled). Second, have a distro-specific test for distro-specific plugins that are also expected to always run on those systems. Closes: #2365 Resolves: #2431 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [tests] Add distro specific helper decoratorsJake Hunsaker2021-04-151-2/+2
| | | | | | | | | | | | | | | | | | | Adds helper decorators to define specific test methods for use on specific distributions only. Currently two decorators are available: @redhat_only Only run on fedora, centos, or rhel @ubuntu_only Only run on ubuntu or debian Note that these decorators are only intended for individual `test_*` methods, and will not function to define distro-specific test classes. These should make it easier to write plugin test cases where packaging differences between distributions otherwise makes plugin tests either impossible needlessly complex to write generically. Related: #2431 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [tests] Set local distro in StageOne to allow distro-specific testsJake Hunsaker2021-04-151-1/+2
| | | | | | | | | | | | | | Moves the detection of the local system's distribution to StageOne, and defines two constants to reference RH and Ubuntu distribution lists to allow for distro-specific tests. Further, make the expected_warnings_displayed test skipped if the local test system is not a RH-family distro, as those warnings are not expected on non RH-family systems. Related: #2431 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [tests] Add a pre-setup setup method and smoke testsJake Hunsaker2021-04-151-0/+56
| | | | | | | | | | | | | | | | First, add a "pre-setup setup" method, in the form of `pre_sos_setup()`, that can be used in the way the traditional `setUp()` method would be used (but can't because that's our entry point for executing our sos runs). This method will be executed _prior_ to any mocking. Second, add a smoke test that enables all plugins that exist in the local branch being tested. This will test that doing so does not generate any exceptions and that some expected warnings from select plugins are displayed. Related: #2431 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [tests] Add plugin tests for basic functionalityJake Hunsaker2021-04-153-0/+137
| | | | | | | | | | | | Adds several plugin tests for plugins that can be expected to run on all distributions, in particular these tests are including mostly Stage Two tests. As such, these tests are only recommended to be run on test machines. Related: #2431 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [tests] Add a StageTwo timeout testJake Hunsaker2021-04-151-0/+44
| | | | | | Adds a test to ensure our timeout control is working properly. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [tests] Start using avocado for test suiteJake Hunsaker2021-04-155-0/+181
This commit represents the start of an overhaul of the test suite used by sos. Note that several more commits to follow will be required in order for the test suite to be considered stable. The new test suite will use the avocado-framework to build out new tests. This first part adopts a new 'stageX' naming scheme for our tests as follows: stage0 -> Unittests stage1 -> Basic function tests, no mocking allowed stage2 -> Mocked tests for specific scenarios/regressions stage3 -> Complex setups for layered products/environments At the moment, these unittests are not updated for avocado, though most should still work with `nosetest` directly. A new set of base classes is defined in tests/sos_tests.py which provide the foundation for actual tests cases. This approach entails new test cases subclassing a base class, such as the new `StageOneReportTest`, and setting the `sos_cmd` class attr to the _options_ for an sos report run. By default `sos report --batch` will be run, and targeted to the test job's directory as a tmpdir. Each sos command will be executed once, and all test_* methods within a test case that subclasses `StageOneReportTest` will be checked against the output of that execution. Note that this diverges from avocado's typical approach where each test_* method is performed against a brand new instance of the class (thus meaning any setup including our sos report run would normally be run fresh). However, after speaking with the avocado devel team, this is still seen as a valid pattern for the framework. The current organizational approach is to separate the tests by component rather than stage. For example. `tests/report_tests/` should hold any report-centric tests, and the `plugin_tests` directory therein should be used for plugin-specific tests. As of this commit, there are basic functionality tests under `tests/report_tests/` and a single plugin test under `tests/report_tests/plugin_tests/` to act as a POC. Further, there is a `tests/vendor_tests/` directory for organizing vendor-specific bug/feature tests that are not covered by the generic project-wide tests. A POC test from RHBZ1928628 is available with this commit. Note that in order for these tests to be run properly _without_ installing the current branch to the local system, you will need to run the following command: `PYTHONPATH=tests/ avocado run -t stageone tests/` Related: #2431 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>