This repository has been archived by the owner on Mar 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 213
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 #186 from tmatilai/install-same-chef-version
Default to installing the same Chef version on the node as is used on work station
- Loading branch information
Showing
4 changed files
with
19 additions
and
12 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 |
---|---|---|
|
@@ -12,12 +12,23 @@ def setup | |
@host = '[email protected]' | ||
end | ||
|
||
def test_uses_local_chef_version_by_default | ||
Chef::Config[:knife][:bootstrap_version] = nil | ||
assert_equal Chef::VERSION, command.chef_version | ||
end | ||
|
||
def test_uses_chef_version_from_knife_config | ||
Chef::Config[:knife][:bootstrap_version] = "10.12.2" | ||
assert_match "10.12.2", command.chef_version | ||
assert_equal "10.12.2", command.chef_version | ||
end | ||
|
||
def test_uses_chef_version_from_command_line_option | ||
Chef::Config[:knife][:bootstrap_version] = "10.16.2" | ||
assert_equal "0.4.2", command("--bootstrap-version", "0.4.2").chef_version | ||
end | ||
|
||
def test_chef_version_returns_nil_if_empty | ||
Chef::Config[:knife][:bootstrap_version] = "10.12.2" | ||
assert_nil command("--bootstrap-version", "").chef_version | ||
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