Sha256: 58c403195a320b5dfb3cf1c18c42145d9e9f445982af2289faa5454087508853
Contents?: true
Size: 1.54 KB
Versions: 17
Compression:
Stored size: 1.54 KB
Contents
require 'spec_helper' require_relative 'configuration_differ_shared_examples.rb' module Vcloud module EdgeGateway describe LoadBalancerConfigurationDiffer do it_behaves_like "a configuration differ" do let(:config_differ) { LoadBalancerConfigurationDiffer } end it 'should ignore remote config having additional :Operational keys in :Pool entries' do local = { Pool: [ { foo: 'bar', deeper: [ 1, 2, 3, 4, 5 ] }, { baz: 'bop', deeper: [ 5, 6, 4, 3, 2 ] }, ]} remote = { Pool: [ { foo: 'bar', Operational: 'wibble', deeper: [ 1, 2, 3, 4, 5 ] }, { baz: 'bop', Operational: 'wobble', deeper: [ 5, 6, 4, 3, 2 ] }, ]} output = [] differ = LoadBalancerConfigurationDiffer.new(local, remote) expect(differ.diff).to eq(output) end it 'should ignore remote config having additional :Operational keys in :Pool entries, yet still report other differences' do local = { Pool: [ { foo: 'bar', deeper: [ 1, 2, 3, 4, 5 ] }, { baz: 'bop', deeper: [ 5, 6, 4, 3, 2 ] }, ]} remote = { Pool: [ { foo: 'bar', Operational: 'wibble', deeper: [ 1, 2, 3, 4, 5 ] }, { baz: 'bop', Operational: 'wobble', deeper: [ 6, 5, 4, 3, 2 ] }, ]} output = [ ["+", "Pool[1].deeper[0]", 6], ["-", "Pool[1].deeper[2]", 6] ] differ = LoadBalancerConfigurationDiffer.new(local, remote) expect(differ.diff).to eq(output) end end end end
Version data entries
17 entries across 17 versions & 1 rubygems