Exemplo n.º 1
0
def test_put_recursive(mock_exec):
    proxy = S3Persistence()
    proxy.put("/test", "s3://my-bucket/k1", True)
    mock_exec.assert_called_with(
        cmd=[
            "aws", "s3", "cp", "--recursive", "--acl",
            "bucket-owner-full-control", "/test", "s3://my-bucket/k1"
        ],
        s3_cfg=S3Config.auto(),
    )
Exemplo n.º 2
0
def test_get_recursive(mock_exec):
    proxy = S3Persistence()
    proxy.get("s3://my-bucket/k1", "/test", True)
    mock_exec.assert_called_with(
        cmd=["aws", "s3", "cp", "--recursive", "s3://my-bucket/k1", "/test"],
        s3_cfg=S3Config.auto())
Exemplo n.º 3
0
 def __init__(self,
              default_prefix: Optional[str] = None,
              data_config: typing.Optional[DataConfig] = None):
     super().__init__(name="awscli-s3", default_prefix=default_prefix)
     self.s3_cfg = data_config.s3 if data_config else S3Config.auto()