Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def setUp(self):
self.ctx = Context({'namespace': 'test'})
def test_sns(self):
ctx = Context({'namespace': 'test', 'environment': 'test'})
blueprint = Topics('topics', ctx)
blueprint.resolve_variables(self.variables)
blueprint.create_template()
self.assertRenderedBlueprint(blueprint)
def setUp(self):
self.ctx = Context({'namespace': 'test'})
def test_s3(self):
ctx = Context(config=Config({'namespace': 'test'}))
blueprint = Buckets('buckets', ctx)
blueprint.resolve_variables(self.variables)
blueprint.create_template()
self.assertRenderedBlueprint(blueprint)
def test_dynamodb_autoscaling(self):
ctx = Context({'namespace': 'test', 'environment': 'test'})
blueprint = stacker_blueprints.dynamodb.AutoScaling('dynamodb_autoscaling', ctx)
blueprint.resolve_variables(self.dynamodb_autoscaling_variables)
blueprint.create_template()
self.assertRenderedBlueprint(blueprint)
def test_s3_static_website(self):
"""Test a static website blog bucket."""
ctx = Context(config=Config({'namespace': 'test'}))
blueprint = Buckets('s3_static_website', ctx)
v = self.variables = [
Variable('Buckets', {
'Blog': {
'AccessControl': 'PublicRead',
'WebsiteConfiguration' : {
'IndexDocument': 'index.html'
}
},
}),
Variable('ReadRoles', [
'Role1',
'Role2',
]),
Variable('ReadWriteRoles', [
def setUp(self):
self.ctx = Context(config=Config({'namespace': 'test'}))
def setUp(self):
self.ctx = Context(config=Config({'namespace': 'test'}))
def setUp(self):
self.ctx = Context(config=Config({'namespace': 'test'}))
self.config = load_config(
options.config.read(),
environment=options.environment,
validate=True,
)
options.provider_builder = default.ProviderBuilder(
region=options.region,
interactive=options.interactive,
replacements_only=options.replacements_only,
recreate_failed=options.recreate_failed,
service_role=self.config.service_role,
)
options.context = Context(
environment=options.environment,
config=self.config,
# Allow subcommands to provide any specific kwargs to the Context
# that it wants.
**options.get_context_kwargs(options)
)
super(Stacker, self).configure(options, **kwargs)
if options.interactive:
logger.info("Using interactive AWS provider mode.")
else:
logger.info("Using default AWS provider mode")