From 6c0b886b11452c5ea3a606902912bf6528b3175e Mon Sep 17 00:00:00 2001 From: rajat-puppet Date: Mon, 11 Sep 2023 10:40:12 +0530 Subject: [PATCH] Fixing CI failure in rubocop --- spec/acceptance/compose_v3_spec.rb | 6 +++--- spec/acceptance/docker_full_spec.rb | 16 ++++++++-------- spec/acceptance/docker_spec.rb | 6 +++--- spec/acceptance/machine_spec.rb | 2 +- spec/acceptance/stack_spec.rb | 2 +- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/spec/acceptance/compose_v3_spec.rb b/spec/acceptance/compose_v3_spec.rb index d7fb704a..75f3a309 100644 --- a/spec/acceptance/compose_v3_spec.rb +++ b/spec/acceptance/compose_v3_spec.rb @@ -33,7 +33,7 @@ class { 'docker::compose': end end - context 'Creating compose v3 projects', win_broken: true do + context 'Creating compose v3 projects', :win_broken do let(:install_pp) do <<-MANIFEST docker_compose { 'web': @@ -59,7 +59,7 @@ class { 'docker::compose': end end - context 'creating compose projects with multi compose files', win_broken: true do + context 'creating compose projects with multi compose files', :win_broken do before(:all) do install_pp = <<-MANIFEST docker_compose { 'web1': @@ -79,7 +79,7 @@ class { 'docker::compose': end end - context 'Destroying project with multiple compose files', win_broken: true do + context 'Destroying project with multiple compose files', :win_broken do let(:destroy_pp) do <<-MANIFEST docker_compose { 'web1': diff --git a/spec/acceptance/docker_full_spec.rb b/spec/acceptance/docker_full_spec.rb index b4dc06f4..906a4c6f 100644 --- a/spec/acceptance/docker_full_spec.rb +++ b/spec/acceptance/docker_full_spec.rb @@ -49,7 +49,7 @@ end describe 'the Puppet Docker module' do - context 'clean up before each test', win_broken: true do + context 'clean up before each test', :win_broken do before(:each) do retry_on_error_matching(60, 5, %r{connection failure running}) do # Stop all container using systemd @@ -70,7 +70,7 @@ end describe 'docker class' do - context 'without any parameters', win_broken: true do + context 'without any parameters', :win_broken do let(:pp) { "class { 'docker': #{docker_args} }" } it 'runs successfully' do @@ -349,7 +349,7 @@ class { 'docker': #{docker_args} } end end - it 'creates a new image based on a tar', win_broken: true do + it 'creates a new image based on a tar', :win_broken do pp = <<-EOS class { 'docker': #{docker_args} } docker::image { '#{default_image}': @@ -585,7 +585,7 @@ class { 'docker': #{docker_args} } # cpuset is not supported on Docker Windows # STDERR: C:/Program Files/Docker/docker.exe: Error response from daemon: invalid option: Windows does not support CpusetCpus. - it 'starts a container with cpuset paramater set', win_broken: true do + it 'starts a container with cpuset paramater set', :win_broken do pp = <<-EOS class { 'docker': #{docker_args} } @@ -614,7 +614,7 @@ class { 'docker': #{docker_args} } end # leagacy container linking was not implemented on Windows. --link is a legacy Docker feature: https://docs.docker.com/network/links/ - it 'starts multiple linked containers', win_broken: true do + it 'starts multiple linked containers', :win_broken do pp = <<-EOS class { 'docker': #{docker_args} } @@ -669,7 +669,7 @@ class { 'docker': #{docker_args} } end end - it 'stops a running container', win_broken: true do + it 'stops a running container', :win_broken do pp = <<-EOS class { 'docker': #{docker_args} } @@ -860,7 +860,7 @@ class { 'docker': #{docker_args} } end end - describe 'docker::exec', win_broken: true do + describe 'docker::exec', :win_broken do it 'runs a command inside an already running container' do pp = <<-EOS class { 'docker': #{docker_args} } @@ -919,7 +919,7 @@ class { 'docker': #{docker_args} } apply_manifest(pp_delete, catch_failures: true) end - it 'onlies run if notified when refreshonly is true', win_broken: true do + it 'onlies run if notified when refreshonly is true', :win_broken do container_name = 'container_4_2' pp = <<-EOS class { 'docker': #{docker_args} } diff --git a/spec/acceptance/docker_spec.rb b/spec/acceptance/docker_spec.rb index 19ab0aa9..41da969f 100644 --- a/spec/acceptance/docker_spec.rb +++ b/spec/acceptance/docker_spec.rb @@ -293,7 +293,7 @@ class { 'docker': #{docker_args}} sleep 10 end - it 'is able to login to the registry', retry: 3, retry_wait: 10, win_broken: true do + it 'is able to login to the registry', :win_broken, retry: 3, retry_wait: 10 do pp = <<-MANIFEST docker::registry { '#{registry_address}': username => 'username', @@ -305,7 +305,7 @@ class { 'docker': #{docker_args}} run_shell("test -e \"#{root_dir}/registry-auth-puppet_receipt_#{server_strip}_root\"", expect_failures: false) end - it 'is able to logout from the registry', win_broken: true do + it 'is able to logout from the registry', :win_broken do pp = <<-MANIFEST docker::registry { '#{registry_address}': ensure=> absent, @@ -315,7 +315,7 @@ class { 'docker': #{docker_args}} run_shell("grep #{registry_address} #{config_file}", expect_failures: true) end - it 'does not create receipt if registry login fails', win_broken: true do + it 'does not create receipt if registry login fails', :win_broken do pp = <<-MANIFEST docker::registry { '#{registry_bad_address}': username => 'username', diff --git a/spec/acceptance/machine_spec.rb b/spec/acceptance/machine_spec.rb index 975a2a65..86e544ce 100644 --- a/spec/acceptance/machine_spec.rb +++ b/spec/acceptance/machine_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper_acceptance' -describe 'docker::machine', win_broken: true do +describe 'docker::machine', :win_broken do context 'with default parameters' do pp = <<-EOS include docker::machine diff --git a/spec/acceptance/stack_spec.rb b/spec/acceptance/stack_spec.rb index 6e27c4cb..2dcce33f 100644 --- a/spec/acceptance/stack_spec.rb +++ b/spec/acceptance/stack_spec.rb @@ -12,7 +12,7 @@ wait_for_container_seconds = 10 end -describe 'docker stack', win_broken: true do +describe 'docker stack', :win_broken do before(:all) do retry_on_error_matching(60, 5, %r{connection failure running}) do install_pp = <<-MANIFEST