berkshelf 7.0.6 → 7.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +7 -7
- data/Rakefile +2 -2
- data/berkshelf.gemspec +9 -10
- data/bin/berks +5 -0
- data/lib/berkshelf.rb +2 -2
- data/lib/berkshelf/api_client/chef_server_connection.rb +3 -2
- data/lib/berkshelf/api_client/connection.rb +1 -1
- data/lib/berkshelf/berksfile.rb +47 -41
- data/lib/berkshelf/cached_cookbook.rb +6 -4
- data/lib/berkshelf/chef_config_compat.rb +1 -0
- data/lib/berkshelf/chef_repo_universe.rb +6 -4
- data/lib/berkshelf/cli.rb +12 -7
- data/lib/berkshelf/commands/shelf.rb +1 -1
- data/lib/berkshelf/community_rest.rb +4 -4
- data/lib/berkshelf/config.rb +1 -1
- data/lib/berkshelf/core_ext.rb +1 -1
- data/lib/berkshelf/core_ext/file_utils.rb +2 -2
- data/lib/berkshelf/dependency.rb +1 -1
- data/lib/berkshelf/downloader.rb +10 -3
- data/lib/berkshelf/errors.rb +2 -2
- data/lib/berkshelf/formatters/human.rb +1 -1
- data/lib/berkshelf/formatters/json.rb +4 -4
- data/lib/berkshelf/installer.rb +1 -1
- data/lib/berkshelf/location.rb +3 -3
- data/lib/berkshelf/lockfile.rb +14 -14
- data/lib/berkshelf/logger.rb +4 -2
- data/lib/berkshelf/mixin/git.rb +1 -1
- data/lib/berkshelf/packager.rb +2 -2
- data/lib/berkshelf/resolver.rb +1 -1
- data/lib/berkshelf/ridley_compat.rb +1 -1
- data/lib/berkshelf/shell.rb +1 -0
- data/lib/berkshelf/source.rb +6 -5
- data/lib/berkshelf/ssl_policies.rb +1 -3
- data/lib/berkshelf/thor.rb +1 -1
- data/lib/berkshelf/thor_ext.rb +1 -1
- data/lib/berkshelf/uploader.rb +11 -9
- data/lib/berkshelf/version.rb +1 -1
- data/lib/berkshelf/visualizer.rb +1 -1
- data/spec/config/knife.rb +1 -1
- data/spec/support/chef_server.rb +2 -2
- data/spec/support/git.rb +18 -18
- data/spec/support/path_helpers.rb +4 -4
- data/spec/tmp/berkshelf/cookbooks/dep-1.0.0/attributes/default.rb +0 -0
- data/spec/tmp/berkshelf/cookbooks/dep-1.0.0/files/default/file.h +0 -0
- data/spec/tmp/berkshelf/cookbooks/dep-1.0.0/metadata.rb +2 -0
- data/spec/tmp/berkshelf/cookbooks/dep-1.0.0/recipes/default.rb +0 -0
- data/spec/tmp/berkshelf/cookbooks/dep-1.0.0/templates/default/template.erb +0 -0
- data/spec/tmp/berkshelf/cookbooks/ekaf-1.0.0/attributes/default.rb +0 -0
- data/spec/tmp/berkshelf/cookbooks/ekaf-1.0.0/files/default/file.h +0 -0
- data/spec/tmp/berkshelf/cookbooks/ekaf-1.0.0/metadata.rb +3 -0
- data/spec/tmp/berkshelf/cookbooks/ekaf-1.0.0/recipes/default.rb +0 -0
- data/spec/tmp/berkshelf/cookbooks/ekaf-1.0.0/templates/default/template.erb +0 -0
- data/spec/tmp/berkshelf/cookbooks/fake-1.0.0/attributes/default.rb +0 -0
- data/spec/tmp/berkshelf/cookbooks/fake-1.0.0/files/default/file.h +0 -0
- data/spec/tmp/berkshelf/cookbooks/fake-1.0.0/metadata.rb +3 -0
- data/spec/tmp/berkshelf/cookbooks/fake-1.0.0/recipes/default.rb +0 -0
- data/spec/tmp/berkshelf/cookbooks/fake-1.0.0/templates/default/template.erb +0 -0
- data/spec/unit/berkshelf/berksfile_spec.rb +7 -7
- data/spec/unit/berkshelf/cli_spec.rb +1 -2
- data/spec/unit/berkshelf/community_rest_spec.rb +1 -1
- data/spec/unit/berkshelf/core_ext/file_utils_spec.rb +2 -2
- data/spec/unit/berkshelf/dependency_spec.rb +5 -5
- data/spec/unit/berkshelf/downloader_spec.rb +29 -8
- data/spec/unit/berkshelf/locations/base_spec.rb +1 -2
- data/spec/unit/berkshelf/locations/path_spec.rb +1 -2
- data/spec/unit/berkshelf/lockfile_spec.rb +9 -18
- data/spec/unit/berkshelf/ridley_compat_spec.rb +1 -1
- data/spec/unit/berkshelf/source_spec.rb +8 -7
- data/spec/unit/berkshelf/ssl_policies_spec.rb +3 -5
- data/spec/unit/berkshelf/uploader_spec.rb +6 -10
- metadata +49 -188
- data/.github/lock.yml +0 -1
- data/.gitignore +0 -30
- data/.rubocop.yml +0 -12
- data/.travis.yml +0 -73
- data/CHANGELOG.legacy.md +0 -307
- data/CHANGELOG.md +0 -1582
- data/CONTRIBUTING.md +0 -68
- data/Gemfile.lock +0 -301
- data/PLUGINS.md +0 -25
- data/README.md +0 -72
- data/Thorfile +0 -61
- data/appveyor.yml +0 -31
- data/docs/berkshelf_for_newcomers.md +0 -64
- data/features/artifactory.feature +0 -70
- data/features/berksfile.feature +0 -46
- data/features/commands/apply.feature +0 -41
- data/features/commands/contingent.feature +0 -47
- data/features/commands/info.feature +0 -141
- data/features/commands/install.feature +0 -646
- data/features/commands/list.feature +0 -78
- data/features/commands/outdated.feature +0 -127
- data/features/commands/package.feature +0 -17
- data/features/commands/search.feature +0 -17
- data/features/commands/shelf/list.feature +0 -32
- data/features/commands/shelf/show.feature +0 -113
- data/features/commands/shelf/uninstall.feature +0 -96
- data/features/commands/show.feature +0 -83
- data/features/commands/update.feature +0 -142
- data/features/commands/upload.feature +0 -499
- data/features/commands/vendor.feature +0 -154
- data/features/commands/verify.feature +0 -29
- data/features/commands/viz.feature +0 -66
- data/features/community_site.feature +0 -37
- data/features/help.feature +0 -11
- data/features/json_formatter.feature +0 -158
- data/features/lifecycle.feature +0 -378
- data/features/lockfile.feature +0 -378
- data/features/step_definitions/berksfile_steps.rb +0 -54
- data/features/step_definitions/chef/config_steps.rb +0 -12
- data/features/step_definitions/chef_server_steps.rb +0 -60
- data/features/step_definitions/cli_steps.rb +0 -18
- data/features/step_definitions/config_steps.rb +0 -46
- data/features/step_definitions/environment_steps.rb +0 -11
- data/features/step_definitions/filesystem_steps.rb +0 -286
- data/features/step_definitions/gem_steps.rb +0 -13
- data/features/step_definitions/json_steps.rb +0 -29
- data/features/step_definitions/utility_steps.rb +0 -11
- data/features/support/aruba.rb +0 -12
- data/features/support/env.rb +0 -77
- data/spec/fixtures/cookbooks/example_cookbook/.gitignore +0 -2
- data/spec/fixtures/cookbooks/example_cookbook/.kitchen.yml +0 -26
data/spec/support/chef_server.rb
CHANGED
data/spec/support/git.rb
CHANGED
@@ -84,26 +84,26 @@ module Berkshelf
|
|
84
84
|
|
85
85
|
private
|
86
86
|
|
87
|
-
|
88
|
-
|
89
|
-
|
87
|
+
# The path to store the local git clones.
|
88
|
+
#
|
89
|
+
# @return [Pathname]
|
90
90
|
def clones
|
91
91
|
ensure_and_return(tmp_path.join("clones"))
|
92
92
|
end
|
93
93
|
|
94
|
-
|
95
|
-
|
96
|
-
|
94
|
+
# The path to store the git remotes.
|
95
|
+
#
|
96
|
+
# @return [Pathname]
|
97
97
|
def remotes
|
98
98
|
ensure_and_return(tmp_path.join("remotes"))
|
99
99
|
end
|
100
100
|
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
101
|
+
# Generate a cookbook by the given name.
|
102
|
+
#
|
103
|
+
# @param [#to_s] name
|
104
|
+
# the name of the cookbook to create
|
105
|
+
# @param [Hash] options
|
106
|
+
# the list ooptions to pass to the generator
|
107
107
|
def generate_git_cookbook(name, options = {})
|
108
108
|
options = {
|
109
109
|
skip_vagrant: true,
|
@@ -114,12 +114,12 @@ module Berkshelf
|
|
114
114
|
Berkshelf::Cli.new.invoke(:cookbook, [name.to_s], options)
|
115
115
|
end
|
116
116
|
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
117
|
+
# Make sure the given path exists and return the path
|
118
|
+
#
|
119
|
+
# @param [#to_s] path
|
120
|
+
# the path to create and return
|
121
|
+
#
|
122
|
+
# @return [Pathname]
|
123
123
|
def ensure_and_return(path)
|
124
124
|
FileUtils.mkdir(path) unless File.exist?(path)
|
125
125
|
Pathname.new(path).expand_path
|
@@ -50,10 +50,10 @@ module Berkshelf
|
|
50
50
|
|
51
51
|
private
|
52
52
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
53
|
+
# This is the magical "reset" function that gives us a clean working
|
54
|
+
# directory on each run.
|
55
|
+
#
|
56
|
+
# @return [nil]
|
57
57
|
def reload_configs
|
58
58
|
Berkshelf.chef_config = chef_config
|
59
59
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -200,10 +200,10 @@ describe Berkshelf::Berksfile do
|
|
200
200
|
|
201
201
|
describe "#dependencies" do
|
202
202
|
let(:groups) do
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
203
|
+
%i{
|
204
|
+
nautilus
|
205
|
+
skarner
|
206
|
+
}
|
207
207
|
end
|
208
208
|
|
209
209
|
it "returns all Berkshelf::Dependencys added to the instance of Berksfile" do
|
@@ -235,8 +235,8 @@ describe Berkshelf::Berksfile do
|
|
235
235
|
describe "#groups" do
|
236
236
|
before do
|
237
237
|
allow(subject).to receive(:dependencies) { [dependency_one, dependency_two] }
|
238
|
-
allow(dependency_one).to receive(:groups) {
|
239
|
-
allow(dependency_two).to receive(:groups) {
|
238
|
+
allow(dependency_one).to receive(:groups) { %i{nautilus skarner} }
|
239
|
+
allow(dependency_two).to receive(:groups) { %i{nautilus riven} }
|
240
240
|
end
|
241
241
|
|
242
242
|
it "returns a hash containing keys for every group a dependency is a member of" do
|
@@ -255,7 +255,7 @@ describe Berkshelf::Berksfile do
|
|
255
255
|
describe "#add_dependency" do
|
256
256
|
let(:name) { "cookbook_one" }
|
257
257
|
let(:constraint) { "= 1.2.0" }
|
258
|
-
let(:options) {
|
258
|
+
let(:options) { {} }
|
259
259
|
|
260
260
|
before(:each) do
|
261
261
|
subject.add_dependency(name, constraint, options)
|
@@ -13,8 +13,7 @@ module Berkshelf
|
|
13
13
|
describe "#upload" do
|
14
14
|
it "calls to upload with params if passed in cli" do
|
15
15
|
expect(berksfile).to receive(:upload).with(cookbooks,
|
16
|
-
include(skip_syntax_check: true, freeze: false)
|
17
|
-
)
|
16
|
+
include(skip_syntax_check: true, freeze: false))
|
18
17
|
|
19
18
|
subject.options[:skip_syntax_check] = true
|
20
19
|
subject.options[:no_freeze] = true
|
@@ -68,7 +68,7 @@ describe Berkshelf::CommunityREST do
|
|
68
68
|
let(:archive) { double("archive", path: "/foo/bar", unlink: true) }
|
69
69
|
|
70
70
|
before do
|
71
|
-
allow(subject).to receive(:stream).with(any_args
|
71
|
+
allow(subject).to receive(:stream).with(any_args).and_return(archive)
|
72
72
|
allow(Berkshelf::CommunityREST).to receive(:unpack)
|
73
73
|
.and_return("/some/path")
|
74
74
|
end
|
@@ -7,12 +7,12 @@ describe FileUtils do
|
|
7
7
|
let(:options) { {} }
|
8
8
|
|
9
9
|
it "uses mv by default" do
|
10
|
-
expect(FileUtils).to receive(:old_mv).with(src, dest, options)
|
10
|
+
expect(FileUtils).to receive(:old_mv).with(src, dest, **options)
|
11
11
|
FileUtils.mv(src, dest, options)
|
12
12
|
end
|
13
13
|
|
14
14
|
it "replaces mv with cp_r and rm_rf" do
|
15
|
-
expect(FileUtils).to receive(:cp_r).with(src, dest, options)
|
15
|
+
expect(FileUtils).to receive(:cp_r).with(src, dest, **options)
|
16
16
|
expect(FileUtils).to receive(:rm_rf).with(src)
|
17
17
|
|
18
18
|
FileUtils.mv(src, dest, options)
|
@@ -71,7 +71,7 @@ describe Berkshelf::Dependency do
|
|
71
71
|
end
|
72
72
|
|
73
73
|
context "given a group option containing an array of groups" do
|
74
|
-
let(:groups) {
|
74
|
+
let(:groups) { %i{development test} }
|
75
75
|
let(:source) { described_class.new(berksfile, cookbook_name, group: groups) }
|
76
76
|
|
77
77
|
it "assigns all the groups to the group attribute" do
|
@@ -95,24 +95,24 @@ describe Berkshelf::Dependency do
|
|
95
95
|
describe "#add_group" do
|
96
96
|
it "stores strings as symbols" do
|
97
97
|
subject.add_group "foo"
|
98
|
-
expect(subject.groups).to eq(
|
98
|
+
expect(subject.groups).to eq(%i{default foo})
|
99
99
|
end
|
100
100
|
|
101
101
|
it "does not store duplicate groups" do
|
102
102
|
subject.add_group "bar"
|
103
103
|
subject.add_group "bar"
|
104
104
|
subject.add_group :bar
|
105
|
-
expect(subject.groups).to eq(
|
105
|
+
expect(subject.groups).to eq(%i{default bar})
|
106
106
|
end
|
107
107
|
|
108
108
|
it "adds multiple groups" do
|
109
109
|
subject.add_group "baz", "quux"
|
110
|
-
expect(subject.groups).to eq(
|
110
|
+
expect(subject.groups).to eq(%i{default baz quux})
|
111
111
|
end
|
112
112
|
|
113
113
|
it "handles multiple groups as an array" do
|
114
114
|
subject.add_group %w{baz quux}
|
115
|
-
expect(subject.groups).to eq(
|
115
|
+
expect(subject.groups).to eq(%i{default baz quux})
|
116
116
|
end
|
117
117
|
end
|
118
118
|
|
@@ -5,14 +5,12 @@ module Berkshelf
|
|
5
5
|
let(:berksfile) do
|
6
6
|
double(Berksfile,
|
7
7
|
lockfile: lockfile,
|
8
|
-
dependencies: []
|
9
|
-
)
|
8
|
+
dependencies: [])
|
10
9
|
end
|
11
10
|
|
12
11
|
let(:lockfile) do
|
13
12
|
double(Lockfile,
|
14
|
-
graph: graph
|
15
|
-
)
|
13
|
+
graph: graph)
|
16
14
|
end
|
17
15
|
|
18
16
|
let(:graph) { double(Lockfile::Graph, locks: {}) }
|
@@ -59,6 +57,31 @@ module Berkshelf
|
|
59
57
|
subject.try_download(source, name, version)
|
60
58
|
end
|
61
59
|
|
60
|
+
context "supports location paths" do
|
61
|
+
before(:each) do
|
62
|
+
allow(source).to receive(:type) { :supermarket }
|
63
|
+
allow(source).to receive(:options) { { ssl: {} } }
|
64
|
+
allow(source).to receive(:uri_string).and_return("http://localhost:8081/repository/chef-proxy")
|
65
|
+
allow(remote_cookbook).to receive(:location_type) { :opscode }
|
66
|
+
end
|
67
|
+
|
68
|
+
let(:rest) { double("community-rest") }
|
69
|
+
|
70
|
+
it "that are relative and prepends the source URI for the download" do
|
71
|
+
allow(remote_cookbook).to receive(:location_path) { "/api/v1" }
|
72
|
+
expect(CommunityREST).to receive(:new).with("http://localhost:8081/repository/chef-proxy/api/v1", { ssl: {} }) { rest }
|
73
|
+
expect(rest).to receive(:download).with(name, version)
|
74
|
+
subject.try_download(source, name, version)
|
75
|
+
end
|
76
|
+
|
77
|
+
it "that are absolute and uses the given absolute URI" do
|
78
|
+
allow(remote_cookbook).to receive(:location_path) { "http://localhost:8081/repository/chef-proxy/api/v1" }
|
79
|
+
expect(CommunityREST).to receive(:new).with("http://localhost:8081/repository/chef-proxy/api/v1", { ssl: {} }) { rest }
|
80
|
+
expect(rest).to receive(:download).with(name, version)
|
81
|
+
subject.try_download(source, name, version)
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
62
85
|
context "with an artifactory source" do
|
63
86
|
it "supports the 'opscode' location type" do
|
64
87
|
allow(source).to receive(:type) { :artifactory }
|
@@ -99,15 +122,13 @@ module Berkshelf
|
|
99
122
|
cookbook_copyright: "user",
|
100
123
|
cookbook_email: "user@example.com",
|
101
124
|
cookbook_license: "apachev2",
|
102
|
-
trusted_certs_dir: self_signed_crt_path
|
103
|
-
)
|
125
|
+
trusted_certs_dir: self_signed_crt_path)
|
104
126
|
end
|
105
127
|
|
106
128
|
let(:berkshelf_config) do
|
107
129
|
double(Config,
|
108
130
|
ssl: double(verify: true),
|
109
|
-
chef: chef_config
|
110
|
-
)
|
131
|
+
chef: chef_config)
|
111
132
|
end
|
112
133
|
|
113
134
|
before do
|
@@ -8,8 +8,7 @@ module Berkshelf
|
|
8
8
|
double("dependency",
|
9
9
|
name: "nginx",
|
10
10
|
version_constraint: constraint,
|
11
|
-
berksfile: berksfile
|
12
|
-
)
|
11
|
+
berksfile: berksfile)
|
13
12
|
end
|
14
13
|
let(:path) { fixtures_path.join("cookbooks", "example_cookbook") }
|
15
14
|
let(:relative_path) { Pathname.new("../../../fixtures/cookbooks/example_cookbook") }
|
@@ -8,8 +8,7 @@ describe Berkshelf::Lockfile do
|
|
8
8
|
let(:lock_path) { File.absolute_path("/path/to/Bacon") }
|
9
9
|
let(:berksfile) do
|
10
10
|
double("Berksfile",
|
11
|
-
filepath: lock_path
|
12
|
-
)
|
11
|
+
filepath: lock_path)
|
13
12
|
end
|
14
13
|
|
15
14
|
subject { described_class.from_berksfile(berksfile) }
|
@@ -77,8 +76,7 @@ describe Berkshelf::Lockfile do
|
|
77
76
|
version: "1.0.0",
|
78
77
|
location: "api",
|
79
78
|
dependencies: {},
|
80
|
-
cached_cookbook: cookbook
|
81
|
-
)
|
79
|
+
cached_cookbook: cookbook)
|
82
80
|
berksfile = double("berksfile", dependencies: [apt])
|
83
81
|
subject.instance_variable_set(:@berksfile, berksfile)
|
84
82
|
allow(subject).to receive(:find).with(apt).and_return(apt)
|
@@ -95,8 +93,7 @@ describe Berkshelf::Lockfile do
|
|
95
93
|
version: "1.0.0",
|
96
94
|
location: "api",
|
97
95
|
dependencies: { "bacon" => "1.0.0" },
|
98
|
-
cached_cookbook: cookbook
|
99
|
-
)
|
96
|
+
cached_cookbook: cookbook)
|
100
97
|
bacon = double(name: "bacon", version: "1.0.0", dependencies: {})
|
101
98
|
berksfile = double("berksfile", dependencies: [apt])
|
102
99
|
subject.instance_variable_set(:@berksfile, berksfile)
|
@@ -115,15 +112,13 @@ describe Berkshelf::Lockfile do
|
|
115
112
|
version: "1.0.0",
|
116
113
|
location: "api",
|
117
114
|
dependencies: { "bacon" => "1.0.0" },
|
118
|
-
cached_cookbook: cookbook
|
119
|
-
)
|
115
|
+
cached_cookbook: cookbook)
|
120
116
|
bacon = double("bacon",
|
121
117
|
name: "bacon",
|
122
118
|
version_constraint: Semverse::Constraint.new(">= 0.0.0"),
|
123
119
|
version: "1.0.0",
|
124
120
|
location: "api",
|
125
|
-
dependencies: { "apt" => "1.0.0" }
|
126
|
-
)
|
121
|
+
dependencies: { "apt" => "1.0.0" })
|
127
122
|
berksfile = double("berksfile", dependencies: [apt])
|
128
123
|
subject.instance_variable_set(:@berksfile, berksfile)
|
129
124
|
allow(subject).to receive(:find).with(apt).and_return(apt)
|
@@ -141,8 +136,7 @@ describe Berkshelf::Lockfile do
|
|
141
136
|
version: "1.0.0",
|
142
137
|
location: "api",
|
143
138
|
dependencies: { "bacon" => "1.0.0" },
|
144
|
-
cached_cookbook: cookbook
|
145
|
-
)
|
139
|
+
cached_cookbook: cookbook)
|
146
140
|
berksfile = double("berksfile", dependencies: [apt])
|
147
141
|
subject.instance_variable_set(:@berksfile, berksfile)
|
148
142
|
allow(subject).to receive(:find).with(apt).and_return(apt)
|
@@ -177,8 +171,7 @@ describe Berkshelf::Lockfile do
|
|
177
171
|
version: "1.0.0",
|
178
172
|
location: "api",
|
179
173
|
dependencies: {},
|
180
|
-
cached_cookbook: cookbook
|
181
|
-
)
|
174
|
+
cached_cookbook: cookbook)
|
182
175
|
berksfile = double("berksfile", dependencies: [apt])
|
183
176
|
subject.instance_variable_set(:@berksfile, berksfile)
|
184
177
|
allow(subject).to receive(:find).with(apt).and_return(apt)
|
@@ -195,8 +188,7 @@ describe Berkshelf::Lockfile do
|
|
195
188
|
version: "1.0.0",
|
196
189
|
location: "api",
|
197
190
|
dependencies: {},
|
198
|
-
cached_cookbook: cookbook
|
199
|
-
)
|
191
|
+
cached_cookbook: cookbook)
|
200
192
|
apt_master = apt.dup
|
201
193
|
allow(apt_master).to receive_messages(location: "github")
|
202
194
|
allow(apt_master).to receive_messages(cached_cookbook: cookbook)
|
@@ -393,8 +385,7 @@ describe Berkshelf::Lockfile::Graph do
|
|
393
385
|
name: "test-0.0.1",
|
394
386
|
version: "0.0.1",
|
395
387
|
cookbook_name: "test",
|
396
|
-
dependencies: {}
|
397
|
-
)
|
388
|
+
dependencies: {})
|
398
389
|
subject.update([cookbook])
|
399
390
|
|
400
391
|
expect(subject.locks.keys).to include(cookbook.cookbook_name)
|
@@ -110,12 +110,12 @@ module Berkshelf
|
|
110
110
|
# Check all baseline values.
|
111
111
|
its([:timeout]) { is_expected.to eq 30 }
|
112
112
|
its([:open_timeout]) { is_expected.to eq 3 }
|
113
|
-
its(
|
114
|
-
its(
|
115
|
-
its(
|
116
|
-
its(
|
117
|
-
its(
|
118
|
-
its(
|
113
|
+
its(%i{ssl verify}) { is_expected.to be true }
|
114
|
+
its(%i{ssl ca_file}) { is_expected.to be_nil }
|
115
|
+
its(%i{ssl ca_path}) { is_expected.to be_nil }
|
116
|
+
its(%i{ssl client_cert}) { is_expected.to be_nil }
|
117
|
+
its(%i{ssl client_key}) { is_expected.to be_nil }
|
118
|
+
its(%i{ssl cert_store}) { is_expected.to be_a(OpenSSL::X509::Store) }
|
119
119
|
end
|
120
120
|
|
121
121
|
context "with a string argument and options" do
|
@@ -198,7 +198,8 @@ module Berkshelf
|
|
198
198
|
[
|
199
199
|
APIClient::RemoteCookbook.new("cb1", "1.0.8"),
|
200
200
|
APIClient::RemoteCookbook.new("cb1", "1.0.22"),
|
201
|
-
]
|
201
|
+
]
|
202
|
+
end
|
202
203
|
|
203
204
|
before do
|
204
205
|
allow_any_instance_of(APIClient::Connection).to receive(:universe).and_return(cookbooks)
|