summaryrefslogtreecommitdiffstats
path: root/testsuite/cli
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/cli')
-rwxr-xr-xtestsuite/cli/outputs/firstaidkit_-a17
-rwxr-xr-xtestsuite/cli/outputs/firstaidkit_-a_-x_plugincli115
-rwxr-xr-xtestsuite/cli/outputs/firstaidkit_-a_fix19
-rwxr-xr-xtestsuite/cli/outputs/firstaidkit_-a_nonexistent11
-rwxr-xr-xtestsuite/cli/outputs/firstaidkit_-f_nonexistent8
-rwxr-xr-xtestsuite/cli/outputs/firstaidkit_-f_plugincli113
-rwxr-xr-xtestsuite/cli/outputs/firstaidkit_-f_plugincli1_fix15
-rwxr-xr-xtestsuite/cli/outputs/firstaidkit_-f_plugincli1_nonexistent10
-rw-r--r--testsuite/cli/plugincli1.py55
-rw-r--r--testsuite/cli/plugincli1.pycbin0 -> 2253 bytes
-rw-r--r--testsuite/cli/plugincli2.py55
-rw-r--r--testsuite/cli/plugincli2.pycbin0 -> 2240 bytes
12 files changed, 218 insertions, 0 deletions
diff --git a/testsuite/cli/outputs/firstaidkit_-a b/testsuite/cli/outputs/firstaidkit_-a
new file mode 100755
index 0000000..269ba93
--- /dev/null
+++ b/testsuite/cli/outputs/firstaidkit_-a
@@ -0,0 +1,17 @@
+Backup system initialized
+Starting the Threads
+Do the work!
+INFO: You are not running the firstaidkit as root. Some plugins may not be available. (Task interpreter)
+INFO: Entering the init phase... (Plugincli2)
+INFO: Entering the prepare phase... (Plugincli2)
+INFO: Entering the diagnose phase... (Plugincli2)
+INFO: Entering the clean phase... (Plugincli2)
+INFO: Entering the init phase... (Plugincli1)
+INFO: Entering the prepare phase... (Plugincli1)
+INFO: Entering the diagnose phase... (Plugincli1)
+INFO: Entering the clean phase... (Plugincli1)
+--- Info section ---
+--------------------
+Waiting for the Threads
+Backup closed
+Done.
diff --git a/testsuite/cli/outputs/firstaidkit_-a_-x_plugincli1 b/testsuite/cli/outputs/firstaidkit_-a_-x_plugincli1
new file mode 100755
index 0000000..1f7a8f3
--- /dev/null
+++ b/testsuite/cli/outputs/firstaidkit_-a_-x_plugincli1
@@ -0,0 +1,15 @@
+Excluding plugin plugincli1
+
+Backup system initialized
+Starting the Threads
+Do the work!
+INFO: You are not running the firstaidkit as root. Some plugins may not be available. (Task interpreter)
+INFO: Entering the init phase... (Plugincli2)
+INFO: Entering the prepare phase... (Plugincli2)
+INFO: Entering the diagnose phase... (Plugincli2)
+INFO: Entering the clean phase... (Plugincli2)
+--- Info section ---
+--------------------
+Waiting for the Threads
+Backup closed
+Done.
diff --git a/testsuite/cli/outputs/firstaidkit_-a_fix b/testsuite/cli/outputs/firstaidkit_-a_fix
new file mode 100755
index 0000000..9bb6e81
--- /dev/null
+++ b/testsuite/cli/outputs/firstaidkit_-a_fix
@@ -0,0 +1,19 @@
+Backup system initialized
+Starting the Threads
+Do the work!
+INFO: You are not running the firstaidkit as root. Some plugins may not be available. (Task interpreter)
+INFO: Entering the init phase... (Plugincli1)
+INFO: Entering the prepare phase... (Plugincli1)
+INFO: Entering the diagnose phase... (Plugincli1)
+INFO: Entering the backup phase... (Plugincli1)
+INFO: Entering the fix phase... (Plugincli1)
+INFO: Entering the clean phase... (Plugincli1)
+INFO: Entering the init phase... (Plugincli2)
+INFO: Entering the prepare phase... (Plugincli2)
+INFO: Entering the diagnose phase... (Plugincli2)
+INFO: Entering the clean phase... (Plugincli2)
+--- Info section ---
+--------------------
+Waiting for the Threads
+Backup closed
+Done.
diff --git a/testsuite/cli/outputs/firstaidkit_-a_nonexistent b/testsuite/cli/outputs/firstaidkit_-a_nonexistent
new file mode 100755
index 0000000..392b189
--- /dev/null
+++ b/testsuite/cli/outputs/firstaidkit_-a_nonexistent
@@ -0,0 +1,11 @@
+Backup system initialized
+Starting the Threads
+Do the work!
+INFO: You are not running the firstaidkit as root. Some plugins may not be available. (Task interpreter)
+INFO: Plugin plugincli2 does not contain flow nonexistent (Task interpreter)
+INFO: Plugin plugincli1 does not contain flow nonexistent (Task interpreter)
+--- Info section ---
+--------------------
+Waiting for the Threads
+Backup closed
+Done.
diff --git a/testsuite/cli/outputs/firstaidkit_-f_nonexistent b/testsuite/cli/outputs/firstaidkit_-f_nonexistent
new file mode 100755
index 0000000..6f1915e
--- /dev/null
+++ b/testsuite/cli/outputs/firstaidkit_-f_nonexistent
@@ -0,0 +1,8 @@
+Backup system initialized
+Starting the Threads
+Do the work!
+INFO: You are not running the firstaidkit as root. Some plugins may not be available. (Task interpreter)
+FAK_ERROR: No plugin by the name of "nonexistent" was found.
+Waiting for the Threads
+Done.
+Backup closed
diff --git a/testsuite/cli/outputs/firstaidkit_-f_plugincli1 b/testsuite/cli/outputs/firstaidkit_-f_plugincli1
new file mode 100755
index 0000000..4d6d507
--- /dev/null
+++ b/testsuite/cli/outputs/firstaidkit_-f_plugincli1
@@ -0,0 +1,13 @@
+Backup system initialized
+Starting the Threads
+Do the work!
+INFO: You are not running the firstaidkit as root. Some plugins may not be available. (Task interpreter)
+INFO: Entering the init phase... (Plugincli1)
+INFO: Entering the prepare phase... (Plugincli1)
+INFO: Entering the diagnose phase... (Plugincli1)
+INFO: Entering the clean phase... (Plugincli1)
+--- Info section ---
+--------------------
+Waiting for the Threads
+Backup closed
+Done.
diff --git a/testsuite/cli/outputs/firstaidkit_-f_plugincli1_fix b/testsuite/cli/outputs/firstaidkit_-f_plugincli1_fix
new file mode 100755
index 0000000..2acd0ee
--- /dev/null
+++ b/testsuite/cli/outputs/firstaidkit_-f_plugincli1_fix
@@ -0,0 +1,15 @@
+Backup system initialized
+Starting the Threads
+Do the work!
+INFO: You are not running the firstaidkit as root. Some plugins may not be available. (Task interpreter)
+INFO: Entering the init phase... (Plugincli1)
+INFO: Entering the prepare phase... (Plugincli1)
+INFO: Entering the diagnose phase... (Plugincli1)
+INFO: Entering the backup phase... (Plugincli1)
+INFO: Entering the fix phase... (Plugincli1)
+INFO: Entering the clean phase... (Plugincli1)
+--- Info section ---
+--------------------
+Waiting for the Threads
+Backup closed
+Done.
diff --git a/testsuite/cli/outputs/firstaidkit_-f_plugincli1_nonexistent b/testsuite/cli/outputs/firstaidkit_-f_plugincli1_nonexistent
new file mode 100755
index 0000000..ae8b0dd
--- /dev/null
+++ b/testsuite/cli/outputs/firstaidkit_-f_plugincli1_nonexistent
@@ -0,0 +1,10 @@
+Backup system initialized
+Starting the Threads
+Do the work!
+INFO: You are not running the firstaidkit as root. Some plugins may not be available. (Task interpreter)
+INFO: Plugin plugincli1 does not contain flow nonexistent (Task interpreter)
+--- Info section ---
+--------------------
+Waiting for the Threads
+Backup closed
+Done.
diff --git a/testsuite/cli/plugincli1.py b/testsuite/cli/plugincli1.py
new file mode 100644
index 0000000..d682f53
--- /dev/null
+++ b/testsuite/cli/plugincli1.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 Plugincli1(Plugin):
+ name = "Plugincli1"
+ version = "3.4.5"
+ author = "John Galt"
+
+ def __init__(self, *args, **kwargs):
+ Plugin.__init__(self, *args, **kwargs)
+ self._reporting.info("Entering the init phase...", origin = self)
+
+ def prepare(self):
+ self._reporting.info("Entering the prepare phase...", origin = self)
+ self._result = ReturnSuccess
+
+ def backup(self):
+ self._reporting.info("Entering the backup phase...", origin = self)
+ self._result = ReturnSuccess
+
+ def restore(self):
+ self._reporting.info("Entering the restore phase...", origin = self)
+ self._result = ReturnSuccess
+
+ def diagnose(self):
+ self._reporting.info("Entering the diagnose phase...", origin = self)
+ self._result = ReturnFailure
+
+ def fix(self):
+ self._reporting.info("Entering the fix phase...", origin = self)
+ self._result = ReturnSuccess
+
+ def clean(self):
+ self._reporting.info("Entering the clean phase...", origin = self)
+ self._result = ReturnSuccess
+
+def get_plugin():
+ return Plugincli1
diff --git a/testsuite/cli/plugincli1.pyc b/testsuite/cli/plugincli1.pyc
new file mode 100644
index 0000000..9d911f0
--- /dev/null
+++ b/testsuite/cli/plugincli1.pyc
Binary files differ
diff --git a/testsuite/cli/plugincli2.py b/testsuite/cli/plugincli2.py
new file mode 100644
index 0000000..b483e41
--- /dev/null
+++ b/testsuite/cli/plugincli2.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 Plugincli2(Plugin):
+ name = "Plugincli2"
+ version = "3.4.5"
+ author = "John Galt"
+
+ def __init__(self, *args, **kwargs):
+ Plugin.__init__(self, *args, **kwargs)
+ self._reporting.info("Entering the init phase...", origin = self)
+
+ def prepare(self):
+ self._reporting.info("Entering the prepare phase...", origin = self)
+ self._result = ReturnSuccess
+
+ def backup(self):
+ self._reporting.info("Entering the backup phase...", origin = self)
+ self._result = ReturnSuccess
+
+ def restore(self):
+ self._reporting.info("Entering the restore phase...", origin = self)
+ self._result = ReturnSuccess
+
+ def diagnose(self):
+ self._reporting.info("Entering the diagnose phase...", origin = self)
+ self._result = ReturnSuccess
+
+ def fix(self):
+ self._reporting.info("Entering the fix phase...", origin = self)
+ self._result = ReturnSuccess
+
+ def clean(self):
+ self._reporting.info("Entering the clean phase...", origin = self)
+ self._result = ReturnSuccess
+
+def get_plugin():
+ return Plugincli2
diff --git a/testsuite/cli/plugincli2.pyc b/testsuite/cli/plugincli2.pyc
new file mode 100644
index 0000000..f77864d
--- /dev/null
+++ b/testsuite/cli/plugincli2.pyc
Binary files differ