test_configsnap.py
def func1_customdir(self):
        """Customised output directory; -d commandline option"""
        test = self.whoami()
        o = self.run_command('./configsnap -d /tmp/test -t functests')
        if o.retcode != 0:
            self.failtest(test, "Exit code non-zero")
        else:
            print("%s PASS Exit code zero" % test)

        # Check that custom dir was created and has content
        if not os.path.isdir('/tmp/test'):
            self.failtest(test, "Custom dir doesn't exist")
        else:
            print("%s PASS Custom dir exists" % test)

        if len(os.listdir('/tmp/test')) < 1:
            self.failtest(test, "No files in custom dir")
        else:
            print("%s PASS Files in custom dir" % test)
Customised output directory; -d commandline option
Customised output directory; -d commandline option
Customised output directory ; - d commandline option
def func1_customdir(self):
        test = self.whoami()
        o = self.run_command('./configsnap -d /tmp/test -t functests')
        if o.retcode != 0:
            self.failtest(test, "Exit code non-zero")
        else:
            print("%s PASS Exit code zero" % test)
        if not os.path.isdir('/tmp/test'):
            self.failtest(test, "Custom dir doesn't exist")
        else:
            print("%s PASS Custom dir exists" % test)
        if len(os.listdir('/tmp/test')) < 1:
            self.failtest(test, "No files in custom dir")
        else:
            print("%s PASS Files in custom dir" % test)
def func1_customdir ( self ) : test = self . whoami ( ) o = self . run_command ( './configsnap -d /tmp/test -t functests' ) if o . retcode != 0 : self . failtest ( test , "Exit code non-zero" ) else : print ( "%s PASS Exit code zero" % test ) if not os . path . isdir ( '/tmp/test' ) : self . failtest ( test , "Custom dir doesn't exist" ) else : print ( "%s PASS Custom dir exists" % test ) if len ( os . listdir ( '/tmp/test' ) ) < 1 : self . failtest ( test , "No files in custom dir" ) else : print ( "%s PASS Files in custom dir" % test )
Customised output directory; -d commandline option
Customised output directory ; - d commandline option
"""Customised output directory; -d commandline option""" # Check that custom dir was created and has content
self