diff options
| author | Joel Andres Granados <jgranado@redhat.com> | 2008-06-02 18:48:31 +0200 |
|---|---|---|
| committer | Joel Andres Granados <jgranado@redhat.com> | 2008-06-02 18:48:31 +0200 |
| commit | ed8bd56bc23923cdf6a8a32c3ea6a0d7646e85bd (patch) | |
| tree | ae606b81816043aab17af364c277c6dcccbfd7f0 /testsuite/initialization | |
| parent | 26c38addde6ab7cf0c6c91b25071ceed472104d6 (diff) | |
| download | firstaidkit-ed8bd56bc23923cdf6a8a32c3ea6a0d7646e85bd.tar.gz firstaidkit-ed8bd56bc23923cdf6a8a32c3ea6a0d7646e85bd.tar.xz firstaidkit-ed8bd56bc23923cdf6a8a32c3ea6a0d7646e85bd.zip | |
Add the testsuite controler (test) and some tests.
Diffstat (limited to 'testsuite/initialization')
| -rw-r--r-- | testsuite/initialization/directory/__init__.py | 3 | ||||
| -rw-r--r-- | testsuite/initialization/directory/directory.py | 43 | ||||
| -rw-r--r-- | testsuite/initialization/initialization.conf | 91 | ||||
| -rw-r--r-- | testsuite/initialization/pluginInfo.py | 55 | ||||
| -rw-r--r-- | testsuite/initialization/pyFile.py | 46 | ||||
| -rw-r--r-- | testsuite/initialization/pycFile | 46 |
6 files changed, 284 insertions, 0 deletions
diff --git a/testsuite/initialization/directory/__init__.py b/testsuite/initialization/directory/__init__.py new file mode 100644 index 0000000..9e799a0 --- /dev/null +++ b/testsuite/initialization/directory/__init__.py @@ -0,0 +1,3 @@ +import directory +def get_plugin(): + return directory.Dir diff --git a/testsuite/initialization/directory/directory.py b/testsuite/initialization/directory/directory.py new file mode 100644 index 0000000..accee7a --- /dev/null +++ b/testsuite/initialization/directory/directory.py @@ -0,0 +1,43 @@ +# First Aid Kit - diagnostic and repair tool for Linux +# Copyright (C) 2008 Joel Granados <jgranado@redhat.com> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +from pyfirstaidkit.plugins import Plugin + +class Dir(Plugin): + name = "TestPlugin" + version = "0.0.1" + author = "Joel Andres Granados" + def __init__(self, *args, **kwargs): + Plugin.__init__(self, *args, **kwargs) + + def prepare(self): + pass + + def backup(self): + pass + + def restore(self): + pass + + def diagnose(self): + pass + + def fix(self): + pass + + def clean(self): + pass diff --git a/testsuite/initialization/initialization.conf b/testsuite/initialization/initialization.conf new file mode 100644 index 0000000..b6cf64c --- /dev/null +++ b/testsuite/initialization/initialization.conf @@ -0,0 +1,91 @@ +# +# First Aid Kit configuration file. +# +# This file basically expresses what firstaidkit defaults to. You may uncomment +# lines that you want to change. + + +# +# System: +# +[system] + +# +# root: +# Defines the relative root that firstaidkit will use for the execution of its +# plugins. +#root = /mnt/sysimage + +# +# frontend: +# Where to look for the frontend modules +#frontend = '/usr/lib64/firstaidkit/frontend' '/usr/lib/firstaidkit/frontend' + +# +# configuration: +# Where to look for configuration tidbits for plugins and other subparts +#configuration = /etc/firstaidkit/ + +# +# Operation: +# +[operation] + +# +# flags: +# +#flags = "" + +# +# mode: +# +#mode = + +# +# help: +# +#help= + +# +# gui: +# +#gui= + +# +# verbose: +# +#verbose= + +# +# interactive: +# +#interactive= + +# +# Log: +# +[log] + +# +# method: +# +#method= + +# +# filename: +# +filename = testsuite/initialization/initialization.log + + +# +# Paths: +# Will hold all the paths defined by the user that hold plugins. +# +[paths] +# +# These directories are the possible places where one can find plugin or example +# plugins. Add directories as you see fit. Unless you are developing plugins +# the default values should be enough. +# lib64: +# +plugin_examples = testsuite/initialization diff --git a/testsuite/initialization/pluginInfo.py b/testsuite/initialization/pluginInfo.py new file mode 100644 index 0000000..8b2d80f --- /dev/null +++ b/testsuite/initialization/pluginInfo.py @@ -0,0 +1,55 @@ +# First Aid Kit - diagnostic and repair tool for Linux +# Copyright (C) 2008 Joel Granados <jgranado@redhat.com> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +from pyfirstaidkit.plugins import Plugin, Flow +from pyfirstaidkit.returns import * + +class PluginInfo(Plugin): + name = "TestInfoPlugin" + version = "3.4.5" + author = "John Galt" + flows={} + flows["newflow"] = Flow({ + Plugin.initial: {Return: "prepare"}, + "prepare" : {ReturnSuccess: "fix"}, + "fix" : {ReturnSuccess: "clean", ReturnFailure: "clean"}, + "clean" : {ReturnSuccess: Plugin.final} + }, description="This is the newflow") + + def __init__(self, *args, **kwargs): + Plugin.__init__(self, *args, **kwargs) + + def prepare(self): + pass + + def backup(self): + pass + + def restore(self): + pass + + def diagnose(self): + pass + + def fix(self): + pass + + def clean(self): + pass + +def get_plugin(): + return PluginInfo diff --git a/testsuite/initialization/pyFile.py b/testsuite/initialization/pyFile.py new file mode 100644 index 0000000..a8afa98 --- /dev/null +++ b/testsuite/initialization/pyFile.py @@ -0,0 +1,46 @@ +# First Aid Kit - diagnostic and repair tool for Linux +# Copyright (C) 2008 Joel Granados <jgranado@redhat.com> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +from pyfirstaidkit.plugins import Plugin + +class PyFile(Plugin): + name = "TestPlugin" + version = "0.0.1" + author = "Joel Andres Granados" + def __init__(self, *args, **kwargs): + Plugin.__init__(self, *args, **kwargs) + + def prepare(self): + pass + + def backup(self): + pass + + def restore(self): + pass + + def diagnose(self): + pass + + def fix(self): + pass + + def clean(self): + pass + +def get_plugin(): + return PyFile diff --git a/testsuite/initialization/pycFile b/testsuite/initialization/pycFile new file mode 100644 index 0000000..40f2f79 --- /dev/null +++ b/testsuite/initialization/pycFile @@ -0,0 +1,46 @@ +# First Aid Kit - diagnostic and repair tool for Linux +# Copyright (C) 2008 Joel Granados <jgranado@redhat.com> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +from pyfirstaidkit.plugins import Plugin + +class PycFile(Plugin): + name = "TestPlugin" + version = "0.0.1" + author = "Joel Andres Granados" + def __init__(self, *args, **kwargs): + Plugin.__init__(self, *args, **kwargs) + + def prepare(self): + pass + + def backup(self): + pass + + def restore(self): + pass + + def diagnose(self): + pass + + def fix(self): + pass + + def clean(self): + pass + +def get_plugin(): + return PycFile |
