Exemplo n.º 1
0
    def testFileSandbox(self):
        """
        _testFileSandbox_

        Test a single sandbox that is a file

        """
        sys.argv = ['scriptName', 'unittestTarball.tgz', '']
        UnpackUserTarball()
        self.assertTrue(os.path.isfile('lib/slc5_ia32_gcc434/libSomething.so'))
Exemplo n.º 2
0
    def testUrlSandbox(self):
        """
        _testUrlSandbox_

        Test a single sandbox that is a URL

        """

        sys.argv = [
            'scriptName', 'http://home.fnal.gov/~ewv/unittestTarball.tgz', ''
        ]
        UnpackUserTarball()
        self.assertTrue(os.path.isfile('lib/slc5_ia32_gcc434/libSomething.so'))
Exemplo n.º 3
0
    def testFileRelocation(self):
        """
        _testFileRelocation_

        Test our ability to relocate files within the sandbox

        """

        sys.argv = [
            'scriptName', 'unittestTarball.tgz',
            'extra_file.txt,additional_file.txt'
        ]
        UnpackUserTarball()
        self.assertTrue(os.path.isfile('../extra_file.txt'))
        self.assertTrue(os.path.isfile('../additional_file.txt'))
Exemplo n.º 4
0
    def testFileAndURLSandbox(self):
        """
        _testFileAndURLSandbox_

        Test two sandboxes. One a file, one a URL

        """

        sys.argv = [
            'scriptName',
            'unittestTarball.tgz,http://home.fnal.gov/~ewv/unittestTarball.tgz',
            ''
        ]
        UnpackUserTarball()
        # First is only in web tarball, second only in local
        self.assertTrue(os.path.isfile('lib/slc5_ia32_gcc434/libSomething.so'))
        self.assertTrue(os.path.isfile('lib/slc5_ia32_gcc434/libSomefile.so'))