Skip to content

Commit

Permalink
More coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
geeknam committed Mar 14, 2016
1 parent d5b0afd commit f3485fa
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 2 additions & 0 deletions examples/simple_instance/ec2_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
@register('ec2')
class EC2Template(BaseTemplate, EnvironmentMixin):

description = 'EC2 with variable instance type depending on environment'

instance = Instance(
'Ec2Instance',
ImageId=FindInMap('RegionMap', Ref('AWS::Region'), 'AMI'),
Expand Down
16 changes: 13 additions & 3 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import os
import json
import json
import shutil
import unittest
import yaml
from mock import patch, Mock
from mock import patch
from cloudarmy.cli import CloudArmy
from cloudarmy.core import registry
from cloudarmy.core.base import BaseTemplate
Expand Down Expand Up @@ -67,7 +67,7 @@ def test_load_templates(self):
issubclass(registry.templates[0]['template'], BaseTemplate)
)

def test_s3_directory(self):
def test_s3_root_dir(self):
ca = CloudArmy(
template_dir=self.example_project_dir,
environment_type='staging'
Expand All @@ -77,6 +77,16 @@ def test_s3_directory(self):
'https://mys3bucket.s3.amazonaws.com/templates'
)

def test_s3_directory(self):
ca = CloudArmy(
template_dir=self.example_project_dir,
environment_type='staging'
)
self.assertEqual(
ca.s3_directory,
'templates'
)

def test_s3_bucket_name(self):
ca = CloudArmy(
template_dir=self.example_project_dir,
Expand Down

0 comments on commit f3485fa

Please sign in to comment.