-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding the ability to use rsync to converge cached and installed modules
Need to use the parent of dest for rsync Reverting gemfile Adding a test. Going to check with maintainers to see if this is a valid testing strategy. Adding ctime to the mix to make sure that the file isn't just assigned the same inode Adding tests for the rsync option using the install command Only compare ctime if inodes match Adding test case to make sure update works properly with git
- Loading branch information
Showing
9 changed files
with
221 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
Then /^the file "([^"]*)" should have an inode and ctime$/ do |file| | ||
prep_for_fs_check do | ||
stat = File.stat(File.expand_path(file)) | ||
@before_inode = { 'ino' => stat.ino, 'ctime' => stat.ctime } | ||
expect(@before_inode['ino']).not_to eq nil | ||
expect(@before_inode['ctime']).not_to eq nil | ||
end | ||
end | ||
|
||
Then /^the file "([^"]*)" should have the same inode and ctime as before$/ do |file| | ||
prep_for_fs_check do | ||
stat = File.stat(File.expand_path(file)) | ||
expect(stat.ino).to eq @before_inode['ino'] | ||
expect(stat.ctime).to eq @before_inode['ctime'] | ||
end | ||
end | ||
|
||
Then /^the file "([^"]*)" should not have the same inode or ctime as before$/ do |file| | ||
prep_for_fs_check do | ||
stat = File.stat(File.expand_path(file)) | ||
|
||
begin | ||
expect(stat.ino).not_to eq @before_inode['ino'] | ||
rescue RSpec::Expectations::ExpectationNotMetError | ||
expect(stat.ctime).not_to eq @before_inode['ctime'] | ||
end | ||
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
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