Sha256: afd0cf47e8c6cb3e1c73aa84f4bd995ed48795769b356b25355b7702cd0f4e99
Contents?: true
Size: 1.86 KB
Versions: 3
Compression:
Stored size: 1.86 KB
Contents
# -*- encoding: utf-8 -*- # # Author:: Tyler Ball (<tball@chef.io>) # # Copyright:: 2015-2018, Fletcher Nichol # Copyright:: 2016-2018, Chef Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. require "kitchen/driver/aws/client" require "climate_control" describe Kitchen::Driver::Aws::Client do let(:client) { Kitchen::Driver::Aws::Client.new("us-west-1") } describe "#initialize" do it "successfully creates a client" do expect(client).to be_a(Kitchen::Driver::Aws::Client) end it "Sets the AWS config" do client expect(Aws.config[:region]).to eq("us-west-1") end context "when provided all optional parameters" do let(:client) do Kitchen::Driver::Aws::Client.new( "us-west-1", "test-profile", "http_proxy", 999, false ) end it "Sets the AWS config" do client expect(Aws.config[:region]).to eq("us-west-1") expect(Aws.config[:profile]).to eq("test-profile") expect(Aws.config[:http_proxy]).to eq("http_proxy") expect(Aws.config[:retry_limit]).to eq(999) expect(Aws.config[:ssl_verify_peer]).to eq(false) end end end it "returns a client" do expect(client.client).to be_a(Aws::EC2::Client) end it "returns a resource" do expect(client.resource).to be_a(Aws::EC2::Resource) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
kitchen-ec2-2.2.2 | spec/kitchen/driver/ec2/client_spec.rb |
kitchen-ec2-2.2.1 | spec/kitchen/driver/ec2/client_spec.rb |
kitchen-ec2-2.2.0 | spec/kitchen/driver/ec2/client_spec.rb |