-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #173 from MissionCriticalCloud/refactor_read_info
Refactor read info classes using a super class
- Loading branch information
Showing
10 changed files
with
156 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,25 @@ | ||
def which(cmd) | ||
exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : [''] | ||
ENV['PATH'].split(File::PATH_SEPARATOR).each do |path| | ||
exts.each { |ext| | ||
exe = File.join(path, "#{cmd}#{ext}") | ||
return exe if File.executable?(exe) && !File.directory?(exe) | ||
} | ||
end | ||
return nil | ||
end | ||
insert_tee_log = ' 2>&1 | tee -a vagrant.log ' if which('tee') | ||
|
||
describe 'VM Life Cycle' do | ||
it 'starts Linux and Windows VM' do | ||
expect(`vagrant up`).to include( | ||
expect(`vagrant up #{insert_tee_log}`).to include( | ||
'linux-box: Machine is booted and ready for use!', | ||
'windows-box: Machine is booted and ready for use!' | ||
) | ||
expect($?.exitstatus).to eq(0) | ||
end | ||
it 'destroys Linux and Windows VM' do | ||
expect(`vagrant destroy --force`).to include('Done removing resources') | ||
expect(`vagrant destroy --force #{insert_tee_log}`).to include('Done removing resources') | ||
expect($?.exitstatus).to eq(0) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.