def test_file_size(self): """ Verify size is correct after dss put and get """ tempdir = tempfile.gettempdir() self._test_file_size(Replica.aws, "s3", self.s3_test_bucket, S3Uploader(tempdir, self.s3_test_bucket)) self._test_file_size(Replica.gcp, "gs", self.gs_test_bucket, GSUploader(tempdir, self.gs_test_bucket))
def test_file_put_cached_files_init_into_checkout(self): tempdir = tempfile.gettempdir() self._test_file_put_cached(Replica.aws, "s3", self.s3_test_bucket, self.s3_test_checkout_bucket, S3Uploader(tempdir, self.s3_test_bucket)) self._test_file_put_cached(Replica.gcp, "gs", self.gs_test_bucket, self.gs_test_checkout_bucket, GSUploader(tempdir, self.gs_test_bucket))
def test_file_get_checkout(self): """ Verifies checkout occurs on first get and not on second. """ tempdir = tempfile.gettempdir() self._test_file_get_checkout(Replica.aws, "s3", self.s3_test_bucket, S3Uploader(tempdir, self.s3_test_bucket)) self._test_file_get_checkout(Replica.gcp, "gs", self.gs_test_bucket, GSUploader(tempdir, self.gs_test_bucket))
def test_file_get_invalid_token(self): """ Verifies that a checkout request with a malformed token returns a 400. :return: """ tempdir = tempfile.gettempdir() self._test_file_get_invalid_token( Replica.aws, "s3", self.s3_test_bucket, S3Uploader(tempdir, self.s3_test_bucket)) self._test_file_get_invalid_token( Replica.gcp, "gs", self.gs_test_bucket, GSUploader(tempdir, self.gs_test_bucket))
def test_file_put(self): tempdir = tempfile.gettempdir() self._test_file_put(Replica.aws, "s3", self.s3_test_bucket, S3Uploader(tempdir, self.s3_test_bucket)) self._test_file_put(Replica.gcp, "gs", self.gs_test_bucket, GSUploader(tempdir, self.gs_test_bucket))