summaryrefslogtreecommitdiff
path: root/spec/integration/knife
diff options
context:
space:
mode:
authorGrégoire Seux <g.seux@criteo.com>2017-03-01 15:05:01 +0100
committerGrégoire Seux <g.seux@criteo.com>2017-03-06 12:00:35 +0100
commit39f3986e6804fe4c4bcbf08f69e3261c55f23b14 (patch)
tree7fcbd41034f89c511116583734dcf18c2fc23c02 /spec/integration/knife
parent9e6bf57b2bc2a2d3422f7798090a6f38c7e6c7b8 (diff)
downloadchef-39f3986e6804fe4c4bcbf08f69e3261c55f23b14.tar.gz
Add test for role listing in knife serve
Change-Id: Ic28361e506643f55f588c7ddb22a27800b634f96 Signed-off-by: Grégoire Seux <g.seux@criteo.com>
Diffstat (limited to 'spec/integration/knife')
-rw-r--r--spec/integration/knife/serve_spec.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/integration/knife/serve_spec.rb b/spec/integration/knife/serve_spec.rb
index 7d379e1e71..04fc0563b6 100644
--- a/spec/integration/knife/serve_spec.rb
+++ b/spec/integration/knife/serve_spec.rb
@@ -53,12 +53,20 @@ describe "knife serve", :workstation do
end
when_the_repository "also has one of each thing" do
- before { file "nodes/x.json", { "foo" => "bar" } }
+ before do
+ file "nodes/x.json", { "foo" => "bar" }
+ file "roles/a_role_with_a_name.json", { "foo" => "bar" }
+ end
it "knife serve serves up /nodes/x" do
with_knife_serve do |api|
expect(api.get("nodes/x")["name"]).to eq("x")
end
end
+ it "knife serve serves up /roles" do
+ with_knife_serve do |api|
+ expect(api.get("roles")).to have_key("a_role_with_a_name")
+ end
+ end
end
end