diff --git a/.gitignore b/.gitignore index e9b3cf4b..b1787c53 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,7 @@ Puppetfile.lock .*.sw? .yardoc/ Guardfile + +# This filename makes windows barf. Which breaks deploys +spec/fixtures/provider/network_config/redhat_spec/network-scripts/ifcfg-eth0:10000000 + diff --git a/Rakefile b/Rakefile index 09701d0f..8da0f19a 100644 --- a/Rakefile +++ b/Rakefile @@ -24,6 +24,16 @@ task 'lint:auto_correct' do Rake::Task[:lint_fix].invoke end +# So windows cannot handle paths with a : character. But that's used by +# a network config fixture. The simplest way to handle it without weird +# and confusing File.read mocks is to simply symlink it before tests are +# run. Gross? Yeah, but it seems like the least gross option. +task :fix_pathname do + FileUtils.ln_sf 'spec/fixtures/provider/network_config/redhat_spec/network-scripts/ifcfg-eth0_10000000', + 'spec/fixtures/provider/network_config/redhat_spec/network-scripts/ifcfg-eth0:10000000' +end +task :spec_prep => :fix_pathname + desc 'Run acceptance tests' RSpec::Core::RakeTask.new(:acceptance) do |t| t.pattern = 'spec/acceptance' diff --git a/spec/fixtures/provider/network_config/redhat_spec/network-scripts/ifcfg-eth0:10000000 b/spec/fixtures/provider/network_config/redhat_spec/network-scripts/ifcfg-eth0:10000000 deleted file mode 100644 index e9a9f338..00000000 --- a/spec/fixtures/provider/network_config/redhat_spec/network-scripts/ifcfg-eth0:10000000 +++ /dev/null @@ -1,9 +0,0 @@ -DEVICE="eth0:10000000" -IPADDR="10.10.10.10" -NETMASK="255.255.255.0" -BOOTPROTO="none" -IPV6INIT="no" -MTU="9000" -NM_CONTROLLED="no" -ONBOOT="yes" -TYPE="Ethernet" diff --git a/spec/fixtures/provider/network_config/redhat_spec/network-scripts/ifcfg-eth0_10000000 b/spec/fixtures/provider/network_config/redhat_spec/network-scripts/ifcfg-eth0_10000000 new file mode 120000 index 00000000..adc3dcee --- /dev/null +++ b/spec/fixtures/provider/network_config/redhat_spec/network-scripts/ifcfg-eth0_10000000 @@ -0,0 +1 @@ +spec/fixtures/provider/network_config/redhat_spec/network-scripts/ifcfg-eth0_10000000 \ No newline at end of file