From a34a1e2fee58fb0bfdc4bfa63899373e0e86d9b1 Mon Sep 17 00:00:00 2001 From: Craig Gumbley Date: Tue, 12 Apr 2022 13:03:37 +0100 Subject: [PATCH] (GH-819) Fix acceptance and unit tests --- spec/classes/init_spec.rb | 6 ------ spec/defines/registry_spec.rb | 9 --------- spec/unit/lib/puppet/type/docker_compose_spec.rb | 9 --------- 3 files changed, 24 deletions(-) diff --git a/spec/classes/init_spec.rb b/spec/classes/init_spec.rb index c2a4af4c..0e4ab609 100644 --- a/spec/classes/init_spec.rb +++ b/spec/classes/init_spec.rb @@ -196,12 +196,6 @@ } else it { - # Stub /tmp_docker dir to prevent shelling out during spec test - allow(Dir).to receive(:exist?).and_wrap_original do |original_method, a| - original_method.call(a) - end - allow(Dir).to receive(:exist?).with('/tmp_docker').and_return(true) - is_expected.to contain_class('docker::repos').that_comes_before('Class[docker::install]') is_expected.to contain_class('docker::install').that_comes_before('Class[docker::config]') is_expected.to contain_class('docker::config').that_comes_before('Class[docker::service]') diff --git a/spec/defines/registry_spec.rb b/spec/defines/registry_spec.rb index de89b70d..bae0e0d8 100644 --- a/spec/defines/registry_spec.rb +++ b/spec/defines/registry_spec.rb @@ -2,15 +2,6 @@ require 'spec_helper' -# Stub /tmp_docker dir to prevent shelling out during spec test -class Dir - class << self - def exist?(var) - return true if var == '/tmp_docker' - end - end -end - tests = { 'with ensure => absent' => { 'ensure' => 'absent', diff --git a/spec/unit/lib/puppet/type/docker_compose_spec.rb b/spec/unit/lib/puppet/type/docker_compose_spec.rb index b0f36d8f..9b310ffb 100644 --- a/spec/unit/lib/puppet/type/docker_compose_spec.rb +++ b/spec/unit/lib/puppet/type/docker_compose_spec.rb @@ -2,15 +2,6 @@ require 'spec_helper' -# Stub /tmp_docker dir to prevent shelling out during spec test -class Dir - class << self - def exist?(var) - return true if var == '/tmp_docker' - end - end -end - compose = Puppet::Type.type(:docker_compose) describe compose do