Sha256: 70e1c7e488bc8b9104ff6f811f8b6b1232ab2a5a8d0cd431d497a1191b38b17e

Contents?: true

Size: 1.22 KB

Versions: 56

Compression:

Stored size: 1.22 KB

Contents

describe Ufo::Tasks::Register do
  before(:all) do
    create_ufo_project
  end

  let(:register) { Ufo::Tasks::Register.new("fake_task_definition_path") }

  context "syslog" do
    let(:data) do
      {
        "containerDefinitions" => [{
          "logConfiguration" => {
            "logDriver" => "syslog"
          }
        }]
      }
    end

    it "#rubyize_format" do
      result = register.rubyize_format(data)
      driver = result[:container_definitions][0][:log_configuration][:log_driver]
      expect(driver).to eq "syslog"
    end
  end

  context "awslogs" do
    let(:data) do
      {
        "containerDefinitions" => [{
          "logConfiguration" => {
            "logDriver" => "awslogs",
            "options" => {
              "awslogs-group" => "mygroup",
              "awslogs-region" => "us-east-1",
              "awslogs-stream-prefix" => "mystream"
            }
          }
        }]
      }
    end

    it "rubyize_format" do
      result = register.rubyize_format(data)
      log_configuration = result[:container_definitions][0][:log_configuration]
      expect(log_configuration[:log_driver]).to eq "awslogs"
      expect(log_configuration[:options].keys).to include("awslogs-group")
    end
  end
end

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
ufo-5.0.7 spec/lib/register_spec.rb
ufo-5.0.6 spec/lib/register_spec.rb
ufo-5.0.5 spec/lib/register_spec.rb
ufo-5.0.4 spec/lib/register_spec.rb
ufo-5.0.3 spec/lib/register_spec.rb
ufo-5.0.2 spec/lib/register_spec.rb
ufo-5.0.1 spec/lib/register_spec.rb
ufo-5.0.0 spec/lib/register_spec.rb
ufo-4.6.3 spec/lib/register_spec.rb
ufo-4.6.2 spec/lib/register_spec.rb
ufo-4.6.1 spec/lib/register_spec.rb
ufo-4.6.0 spec/lib/register_spec.rb
ufo-4.5.11 spec/lib/register_spec.rb
ufo-4.5.10 spec/lib/register_spec.rb
ufo-4.5.9 spec/lib/register_spec.rb
ufo-4.5.8 spec/lib/register_spec.rb
ufo-4.5.7 spec/lib/register_spec.rb
ufo-4.5.6 spec/lib/register_spec.rb
ufo-4.5.5 spec/lib/register_spec.rb
ufo-4.5.4 spec/lib/register_spec.rb