Sha256: 2de27297f210518960b7df327671694ba889426288da93563b20b2872deaed38

Contents?: true

Size: 1.05 KB

Versions: 11

Compression:

Stored size: 1.05 KB

Contents

require 'test_helper'
require 'json'

describe 'AWS::DirectoryService' do
  let(:simple_ad_template) do
    ::Convection.template do
      directoryservice_simple_ad 'SimpleActiveDirectory' do
        description 'Example simple AD'
        enable_sso false
        name 'ExampleSimpleAD'
        password 'directory.password'
        short_name 'directory.name'
        size 'Small'

        vpc_settings 'SubnetIds', ['subnet-deadb33f']
        vpc_settings 'VpcId', 'vpc-deadb33f'
      end
    end
  end

  describe 'SimpleAD' do
    it 'sets VpcSettings.SubnetIds' do
      vpc_settings = simple_ad_json.fetch('Properties').fetch('VpcSettings')
      assert_equal vpc_settings.fetch('SubnetIds'), ['subnet-deadb33f']
    end

    it 'sets VpcSettings.VpcId' do
      vpc_settings = simple_ad_json.fetch('Properties').fetch('VpcSettings')
      assert_equal vpc_settings.fetch('VpcId'), 'vpc-deadb33f'
    end
  end

  private

  def simple_ad_json
    JSON.parse(simple_ad_template.to_json)
        .fetch('Resources')
        .fetch('SimpleActiveDirectory')
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
convection-0.2.32 test/convection/model/test_directory_service.rb
convection-0.2.31 test/convection/model/test_directory_service.rb
convection-0.2.30 test/convection/model/test_directory_service.rb
convection-0.2.29 test/convection/model/test_directory_service.rb
convection-0.2.28 test/convection/model/test_directory_service.rb
convection-0.2.27 test/convection/model/test_directory_service.rb
convection-0.2.26 test/convection/model/test_directory_service.rb
convection-0.2.25 test/convection/model/test_directory_service.rb
convection-0.2.24 test/convection/model/test_directory_service.rb
convection-0.2.23 test/convection/model/test_directory_service.rb
convection-0.2.22 test/convection/model/test_directory_service.rb