Esempio n. 1
0
    def test_path_join(self):

        self.assertEqual(S3Output.join("s3://xyz/", "/bar/"), "s3://xyz/bar")

        self.assertEqual(S3Output.join("s3://xyz/", "/bar/", "foo"), "s3://xyz/bar/foo")

        self.assertEqual(S3Output.join("s3://xyz/xyz/", "/bar/"), "s3://xyz/xyz/bar")
Esempio n. 2
0
    def test_path_join(self):

        self.assertEqual(S3Output.join("s3://xyz/", "/bar/"), "s3://xyz/bar")

        self.assertEqual(S3Output.join("s3://xyz/", "/bar/", "foo"),
                         "s3://xyz/bar/foo")

        self.assertEqual(S3Output.join("s3://xyz/xyz/", "/bar/"),
                         "s3://xyz/xyz/bar")
Esempio n. 3
0
    def test_path_join(self):

        self.assertEqual(S3Output.join('s3://xyz/', '/bar/'), 's3://xyz/bar')

        self.assertEqual(S3Output.join('s3://xyz/', '/bar/', 'foo'),
                         's3://xyz/bar/foo')

        self.assertEqual(S3Output.join('s3://xyz/xyz/', '/bar/'),
                         's3://xyz/xyz/bar')
Esempio n. 4
0
    def test_path_join(self):

        self.assertEqual(
            S3Output.join('s3://xyz/', '/bar/'),
            's3://xyz/bar')

        self.assertEqual(
            S3Output.join('s3://xyz/', '/bar/', 'foo'),
            's3://xyz/bar/foo')

        self.assertEqual(
            S3Output.join('s3://xyz/xyz/', '/bar/'),
            's3://xyz/xyz/bar')
Esempio n. 5
0
    def get_s3_output(self):
        output = S3Output(
            ExecutionContext(
                None, Bag(name="xyz"),
                Config.empty(output_dir="s3://cloud-custodian/policies")))
        self.addCleanup(shutil.rmtree, output.root_dir)

        return output