-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:chef/chef-provisioning-aws
Conflicts: lib/chef/provider/aws_launch_configuration.rb
- Loading branch information
Showing
8 changed files
with
144 additions
and
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
class Chef | ||
module Provisioning | ||
module AWSDriver | ||
VERSION = '3.0.1' | ||
VERSION = '3.0.2' | ||
end | ||
end | ||
end |
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,69 @@ | ||
require 'spec_helper' | ||
|
||
describe Chef::Resource::AwsLaunchConfiguration do | ||
extend AWSSupport | ||
|
||
when_the_chef_12_server "exists", organization: 'foo', server_scope: :context do | ||
with_aws "when connected to AWS" do | ||
let(:image_filters) { | ||
{ | ||
filters: [ | ||
{ | ||
name: "image-type", | ||
values: ["machine"] | ||
}, | ||
{ | ||
name: "state", | ||
values: ["available"] | ||
}, | ||
{ | ||
name: "is-public", | ||
values: ["true"] | ||
}, | ||
{ | ||
name: "owner-alias", | ||
values: ["amazon"] | ||
} | ||
] | ||
} | ||
} | ||
|
||
it "creates a minimum aws_launch_configuration" do | ||
expect_recipe { | ||
ami = driver.ec2_client.describe_images(image_filters).images[0].image_id | ||
aws_launch_configuration "my-launch-configuration" do | ||
image ami | ||
instance_type 't2.micro' | ||
end | ||
}.to create_an_aws_launch_configuration("my-launch-configuration").and be_idempotent | ||
end | ||
|
||
it "accepts base64 encoded user data" do | ||
expect_recipe { | ||
ami = driver.ec2_client.describe_images(image_filters).images[0].image_id | ||
aws_launch_configuration "my-launch-configuration" do | ||
image ami | ||
instance_type 't2.micro' | ||
options({ | ||
user_data: Base64.encode64("echo 1") | ||
}) | ||
end | ||
}.to create_an_aws_launch_configuration("my-launch-configuration").and be_idempotent | ||
end | ||
|
||
it "accepts regular user data" do | ||
expect_recipe { | ||
ami = driver.ec2_client.describe_images(image_filters).images[0].image_id | ||
aws_launch_configuration "my-launch-configuration" do | ||
image ami | ||
instance_type 't2.micro' | ||
options({ | ||
user_data: "echo 1" | ||
}) | ||
end | ||
}.to create_an_aws_launch_configuration("my-launch-configuration").and be_idempotent | ||
end | ||
|
||
end | ||
end | ||
end |