From b0490c8639ef5c30abc578332b23fcbe395e7b93 Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Sun, 21 Apr 2013 18:49:26 -0300 Subject: [PATCH] Clean up sanity check code --- spec/acceptance/sanity_check_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/acceptance/sanity_check_spec.rb b/spec/acceptance/sanity_check_spec.rb index 2206bf2..296ee55 100644 --- a/spec/acceptance/sanity_check_spec.rb +++ b/spec/acceptance/sanity_check_spec.rb @@ -11,11 +11,11 @@ describe 'Sanity check' do it 'creates a container' do containers = `sudo lxc-ls`.chomp.split(/\s+/).uniq - expect(containers).to include File.read('/vagrant/spec/.vagrant/machines/default/lxc/id').strip.chomp + expect(containers).to include vagrant_container_name end it 'starts the newly created container' do - status = `sudo lxc-info -n #{File.read('/vagrant/spec/.vagrant/machines/default/lxc/id').strip.chomp}` + status = `sudo lxc-info -n #{vagrant_container_name}` expect(status).to include 'RUNNING' end @@ -48,7 +48,7 @@ describe 'Sanity check' do end it 'shuts down container' do - status = `sudo lxc-info -n #{File.read('/vagrant/spec/.vagrant/machines/default/lxc/id').strip.chomp}` + status = `sudo lxc-info -n #{vagrant_container_name}` expect(status).to include 'STOPPED' end @@ -62,7 +62,7 @@ describe 'Sanity check' do before(:all) do destroy_container vagrant_up - @container_name = File.read('/vagrant/spec/.vagrant/machines/default/lxc/id').strip.chomp + @container_name = vagrant_container_name vagrant_destroy end