-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from ibejohn818/refactor-userdata
update asg
- Loading branch information
Showing
11 changed files
with
126 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import pytest | ||
import stackformation | ||
from stackformation.aws.stacks import eip | ||
|
||
|
||
|
||
|
||
@pytest.fixture | ||
def test_infra(): | ||
|
||
infra = stackformation.Infra('test') | ||
test_infra = infra.create_sub_infra('test') | ||
|
||
|
||
return { | ||
'infra': infra, | ||
'test_infra': test_infra | ||
} | ||
|
||
def test_eip_stack(test_infra): | ||
|
||
eip_stack = test_infra['test_infra'].add_stack(eip.EIPStack('test')) | ||
|
||
web_ip = eip_stack.add_ip('Web') | ||
|
||
assert isinstance(web_ip, (eip.EIP)) | ||
|
||
find_ip = eip_stack.find_ip('Web') | ||
|
||
assert find_ip.name == 'Web' | ||
|
||
none_ip = eip_stack.find_ip('none') | ||
|
||
assert none_ip is None | ||
|
||
t = eip_stack.build_template() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import pytest | ||
import stackformation | ||
from stackformation.aws import user_data | ||
from stackformation.aws.stacks import (ec2) | ||
from stackformation import utils | ||
|
||
|
||
@pytest.fixture | ||
def test_infra(): | ||
|
||
infra = stackformation.Infra("test") | ||
test_infra = infra.create_sub_infra("test") | ||
ec2_stack = test_infra.add_stack(ec2.EC2Stack('test')) | ||
env = utils.jinja_env(test_infra.context, True) | ||
|
||
return { | ||
'infra': infra, | ||
'test_infra': test_infra, | ||
'ec2_stack': ec2_stack, | ||
'env': env | ||
} |