Пример #1
0
 def __init__(self, methodName = "runTest"):
     '''
     To run the sharestore tests, you must create a section in the ~/.vault
     test config file with the following form:
     
     [Share]
     folder = <folder that the remote system will be mounted to>
     mount = <mount command>
     umount = <umount command>
     
     The folder will be deleted after the tests have run.
     
     For example:
     [Share]
     folder = /tmp/vault-test
     mount = sshfs <name>@<server>:<remote-folder> /tmp/vault-test
     umount = fusermount -u /tmp/vault-test
     '''
     StoreBaseTests.__init__(self)
     unittest.TestCase.__init__(self, methodName)
     try:
         self.folder = self.config.get("Share", "folder")
         self.mount = self.config.get("Share", "mount")
         self.umount = self.config.get("Share", "umount")
     except:
         raise Exception("Share config missing from vault test config")
Пример #2
0
 def __init__(self, methodName = "runTest"):
     StoreBaseTests.__init__(self)
     unittest.TestCase.__init__(self, methodName)
     
     try:
         self.key = self.config.get("Amazon", "aws_access_key_id")
         self.secret_key = self.config.get("Amazon", "aws_secret_access_key")
         self.bucket = self.config.get("Amazon", "bucket")
     except:
         raise Exception("Amazon keys missing from vault test config")
Пример #3
0
    def __init__(self, methodName="runTest"):
        StoreBaseTests.__init__(self)
        unittest.TestCase.__init__(self, methodName)

        try:
            self.root = self.config.get("Google", "root")
            self.login = self.config.get("Google", "login")
            self.password = self.config.get("Google", "password")
        except Exception as e:
            raise Exception("Google login or password missing from vault test config", str(e))
Пример #4
0
    def __init__(self, methodName="runTest"):
        StoreBaseTests.__init__(self)
        unittest.TestCase.__init__(self, methodName)

        try:
            self.server = self.config.get("FTP", "server")
            self.login = self.config.get("FTP", "login")
            self.password = self.config.get("FTP", "password")
            self.folder = self.config.get("FTP", "folder")

        except Exception as e:
            raise Exception("FTP server, login or password missing from vault test config", str(e))
Пример #5
0
    def __init__(self, methodName = "runTest"):
        StoreBaseTests.__init__(self)
        unittest.TestCase.__init__(self, methodName)

        try:
            self.login = self.config.get("DropBox", "login")
            self.password = self.config.get("DropBox", "password")
            self.folder = self.config.get("DropBox", "folder")
            self.app_key = self.config.get("DropBox", "app_key")
            self.app_secret_key = self.config.get("DropBox", "app_secret_key")
        except Exception as e:
            raise Exception("DropBox login or password missing from vault test config", str(e))
Пример #6
0
 def tearDown(self):
     StoreBaseTests.tearDown(self)
Пример #7
0
 def setUp(self):
     StoreBaseTests.setUp(self)
     utils.makedirs(self.folder)
    
     self.store = ShareStore("storetest", 0, False, self.folder, self.mount, self.umount)
Пример #8
0
 def setUp(self):
     StoreBaseTests.setUp(self)
     self.store = FTPStore("storetest", 0, False, self.server, self.folder, self.login, self.password, sftp=True)
Пример #9
0
 def setUp(self):
     StoreBaseTests.setUp(self)
     self.store = GoogleStore("storetest", 0, False, self.root, self.login, self.password)
Пример #10
0
 def setUp(self):
     StoreBaseTests.setUp(self)
     self.store = S3Store("s3storetest", 0, False, bucket=self.bucket, key=self.key, secret_key=self.secret_key)
Пример #11
0
 def setUp(self):
     StoreBaseTests.setUp(self)
     self.store = DropBoxStore("storetest", 0, False, self.folder, self.login, self.password,
                               self.app_key, self.app_secret_key)
Пример #12
0
 def setUp(self):
     StoreBaseTests.setUp(self)
     self.store_folder = tempfile.mkdtemp()
     self.store = FolderStore("storetest", 0, False, self.store_folder)
Пример #13
0
 def __init__(self, methodName = "runTest"):
     StoreBaseTests.__init__(self)
     unittest.TestCase.__init__(self, methodName)