def test_class(self): with moto.mock_redshift(): whitelist = {"redshift": {"cluster": ["test_class123"]}} settings = { "general": {"dry_run": False}, "services": {"redshift": {"clusters": {"clean": True, "ttl": -1}}}, } resource_tree = {"AWS": {}} test_class = redshift_cleanup.RedshiftCleanup( logging, whitelist, settings, resource_tree, "ap-southeast-2" ) yield test_class
def test_class(self): with moto.mock_redshift(): allowlist = {} settings = { "general": { "dry_run": False }, "services": { "redshift": { "clusters": { "clean": True, "ttl": 7 } } }, } execution_log = {"AWS": {}} test_class = redshift_cleanup.RedshiftCleanup( logging, allowlist, settings, execution_log, "ap-southeast-2") yield test_class
def redshift(aws_credentials): with mock_redshift(): yield boto3.client('redshift', region_name='eu-central-1')