Sha256: 43acd57cac1d937396cce89ed1cd38643f7288e67204bf41e098af677d9e3afe

Contents?: true

Size: 817 Bytes

Versions: 90

Compression:

Stored size: 817 Bytes

Contents

describe Terraspace::Plugin::Expander::Generic do
  let(:expander) { described_class.new(mod) }
  let(:props) do
    {
      bucket:         "my-bucket",
      key:            ":env/:build_dir/terraform.tfstate", # variable notation expanded by terraspace
      region:         "us-west-2",
      encrypt:        true,
      dynamodb_table: "terraform_locks"
    }
  end
  let(:mod) do
    mod = double(:mod).as_null_object
    allow(mod).to receive(:build_dir).and_return("stacks/core")
    mod
  end

  context "default path" do
    it "expand" do
      result = expander.expand(props)
      expect(result).to eq({
        bucket: "my-bucket",
        key: "dev/stacks/core/terraform.tfstate",
        region: "us-west-2",
        encrypt: true,
        dynamodb_table: "terraform_locks"
      })
    end
  end
end

Version data entries

90 entries across 90 versions & 1 rubygems

Version Path
terraspace-2.2.3 spec/terraspace/provider/expander/generic_spec.rb
terraspace-2.2.2 spec/terraspace/provider/expander/generic_spec.rb
terraspace-2.2.1 spec/terraspace/provider/expander/generic_spec.rb
terraspace-2.2.0 spec/terraspace/provider/expander/generic_spec.rb
terraspace-2.1.7 spec/terraspace/provider/expander/generic_spec.rb
terraspace-2.1.6 spec/terraspace/provider/expander/generic_spec.rb
terraspace-2.1.5 spec/terraspace/provider/expander/generic_spec.rb
terraspace-2.1.4 spec/terraspace/provider/expander/generic_spec.rb
terraspace-2.1.3 spec/terraspace/provider/expander/generic_spec.rb
terraspace-2.1.2 spec/terraspace/provider/expander/generic_spec.rb
terraspace-2.1.1 spec/terraspace/provider/expander/generic_spec.rb
terraspace-2.1.0 spec/terraspace/provider/expander/generic_spec.rb
terraspace-2.0.3 spec/terraspace/provider/expander/generic_spec.rb
terraspace-2.0.2 spec/terraspace/provider/expander/generic_spec.rb
terraspace-2.0.1 spec/terraspace/provider/expander/generic_spec.rb
terraspace-2.0.0 spec/terraspace/provider/expander/generic_spec.rb
terraspace-1.1.7 spec/terraspace/provider/expander/generic_spec.rb
terraspace-1.1.6 spec/terraspace/provider/expander/generic_spec.rb
terraspace-1.1.5 spec/terraspace/provider/expander/generic_spec.rb
terraspace-1.1.4 spec/terraspace/provider/expander/generic_spec.rb