aboutsummaryrefslogtreecommitdiffstats
path: root/plugins_overview.py
diff options
context:
space:
mode:
authorJake Hunsaker <jhunsake@redhat.com>2021-03-24 17:40:49 -0400
committerJake Hunsaker <jhunsake@redhat.com>2021-04-15 11:33:03 -0400
commite753d9c35054cc5e0430a5e739036e5f88635b15 (patch)
tree2d37de1f8e1c4c989d9154bff30edb595ef845b1 /plugins_overview.py
parent3bb56538d1f9734ad09d88751256fd1b1301f471 (diff)
downloadsos-e753d9c35054cc5e0430a5e739036e5f88635b15.tar.gz
[tests] Add StageTwoReportTest as a base test class
This commits adds a `StageTwoReportTest` from which tests that need to do "light" mocking should be defined. As the name implies, this is the base class for our Stage 2 tests. "Light" mocking for our purposes is currently defined as dropping files in locations on the test system's filesystem, which may include replacing binaries, and installing packages for the durtation of the test case. At the end of the test, packages are uninstalled and mocked files are removed. In the event that a file already exists at a given location on the test system, that file is temporarily renamed with a '.sostesting' extension. On test clean up, once mocked files are removed, any files renamed previously are moved back to their original location/name. Mocking is controlled automatically during test setup, and is based upon test class attributes, similar to how plugin enablement is dependent upon plugin class attributes. For Stage 2 tests cases, this includes: `files` - a list of file names. These names should represent the "real" location on the filesystem where the mocked files will be placed. The mocked content should be placed under a similar file path under tests/test_data E.G. using `files = ['/etc/foo/bar']` will place a copy of `tests/test_data/etc/foo/bar` under `/etc/foo/bar` on the test system. `packages` - a dict of packages to install. The dict keys map to the distribution the package names are used for, e.g. `rhel` or `ubuntu`. The values are lists of package names, optionally with version included. This commit includes just the framework for these tests, and no actual Stage 2 tests are included as of yet. Related: #2431 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Diffstat (limited to 'plugins_overview.py')
0 files changed, 0 insertions, 0 deletions