[PATCH aeolus-image-rubygem 4/4] Expanded tests for Katello client
Matt Wagner
matt.wagner at redhat.com
Tue Jun 5 21:59:12 UTC 2012
---
spec/models/katello/organization_spec.rb | 63 +++++++
spec/models/katello/templates_spec.rb | 63 +++++++
spec/spec_helper.rb | 2 +
spec/vcr/cassettes/katello-organization_all.yml | 32 ++++
.../katello-organization_environments.yml | 63 +++++++
spec/vcr/cassettes/katello-organization_find.yml | 32 ++++
spec/vcr/cassettes/katello-template_all.yml | 30 +++
spec/vcr/cassettes/katello-template_deep_assoc.yml | 187 ++++++++++++++++++++
.../cassettes/katello-template_environments.yml | 94 ++++++++++
9 files changed, 566 insertions(+), 0 deletions(-)
create mode 100644 spec/models/katello/organization_spec.rb
create mode 100644 spec/models/katello/templates_spec.rb
create mode 100644 spec/vcr/cassettes/katello-organization_all.yml
create mode 100644 spec/vcr/cassettes/katello-organization_environments.yml
create mode 100644 spec/vcr/cassettes/katello-organization_find.yml
create mode 100644 spec/vcr/cassettes/katello-template_all.yml
create mode 100644 spec/vcr/cassettes/katello-template_deep_assoc.yml
create mode 100644 spec/vcr/cassettes/katello-template_environments.yml
diff --git a/spec/models/katello/organization_spec.rb b/spec/models/katello/organization_spec.rb
new file mode 100644
index 0000000..c81d9fc
--- /dev/null
+++ b/spec/models/katello/organization_spec.rb
@@ -0,0 +1,63 @@
+#
+# Copyright 2012 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+require 'spec_helper'
+
+module Aeolus
+ module Image
+ module Katello
+ describe Organization do
+ before(:all) do
+ Base.config = {
+ :site => 'http://example.com/katello/api',
+ :user => 'admin',
+ :password => 'admin'
+ }
+ end
+
+ context do
+ use_vcr_cassette "katello-organization_all"
+ it "should return valid output for .all" do
+ orgs = Aeolus::Image::Katello::Organization.all
+ orgs.size.should equal(1)
+ orgs .first.cp_key.should == "ACME_Corporation"
+ end
+ end
+
+ context do
+ use_vcr_cassette 'katello-organization_find'
+ it "should return valid output for .find" do
+ org= Aeolus::Image::Katello::Organization.find('ACME_Corporation')
+ org.cp_key.should == "ACME_Corporation"
+ org.id.should == 1
+ end
+ end
+
+ context do
+ use_vcr_cassette 'katello-organization_environments'
+ it "should return a valid association for .environments" do
+ org = Aeolus::Image::Katello::Organization.find('ACME_Corporation')
+ environments = org.environments
+ environments.class.should == Array
+ environments.size.should == 4
+ environments.first.name.should == "Library"
+ environments.first.library.should be_true
+ environments.first.organization.should == "ACME_Corporation"
+ end
+ end
+ end
+ end
+ end
+end
diff --git a/spec/models/katello/templates_spec.rb b/spec/models/katello/templates_spec.rb
new file mode 100644
index 0000000..2fb248b
--- /dev/null
+++ b/spec/models/katello/templates_spec.rb
@@ -0,0 +1,63 @@
+#
+# Copyright 2012 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+require 'spec_helper'
+
+module Aeolus
+ module Image
+ module Katello
+ describe Template do
+ before(:all) do
+ Base.config = {
+ :site => 'http://example.com/katello/api',
+ :user => 'admin',
+ :password => 'admin'
+ }
+ end
+
+ context do
+ use_vcr_cassette "katello-template_all"
+
+ it "should return nil when called with no context" do
+ template = Aeolus::Image::Katello::Template.all
+ template.should be_nil
+ end
+ end
+
+
+ context do
+ use_vcr_cassette "katello-template_environments"
+ it "should be a valid association for environments" do
+ env = Aeolus::Image::Katello::Environment.find(1)
+ env.templates.class.should equal(Array)
+ env.templates.first.description.should == 'Testing'
+ end
+ end
+
+ context do
+ use_vcr_cassette "katello-template_deep_assoc"
+ it "should have be valid as a nested association" do
+ org = Aeolus::Image::Katello::Organization.first
+ env = org.environments.first
+ templates = env.templates
+ env.templates.size.should == 1
+ env.templates.first.class.should equal(Aeolus::Image::Katello::Template)
+ env.templates.first.name.should == 'testaroo'
+ end
+ end
+ end
+ end
+ end
+end
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 2fbfced..cf72173 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -28,6 +28,8 @@ require 'warehouse/provider_image'
require 'warehouse/template'
# Katello
require 'katello/base'
+require 'katello/template'
+require 'katello/organization'
RSpec.configure do |config|
config.extend VCR::RSpec::Macros
diff --git a/spec/vcr/cassettes/katello-organization_all.yml b/spec/vcr/cassettes/katello-organization_all.yml
new file mode 100644
index 0000000..fb0a35c
--- /dev/null
+++ b/spec/vcr/cassettes/katello-organization_all.yml
@@ -0,0 +1,32 @@
+---
+- !ruby/struct:VCR::HTTPInteraction
+ request: !ruby/struct:VCR::Request
+ method: :get
+ uri: http://admin:admin@example.com/katello/api/organizations
+ body:
+ headers:
+ accept:
+ - application/json
+ response: !ruby/struct:VCR::Response
+ status: !ruby/struct:VCR::ResponseStatus
+ code: 200
+ message: OK
+ headers:
+ cache-control:
+ - max-age=0, private, must-revalidate
+ content-type:
+ - application/json; charset=utf-8
+ x-runtime:
+ - "0.014672"
+ etag:
+ - "\"f7bec50297c3a7219bbec97f4ecff2a7\""
+ date:
+ - Tue, 05 Jun 2012 21:24:02 GMT
+ server:
+ - thin 1.2.11 codename Bat-Shit Crazy
+ transfer-encoding:
+ - chunked
+ x-ua-compatible:
+ - IE=Edge,chrome=1
+ body: "[{\"created_at\":\"2012-06-01T22:13:49Z\",\"task_id\":null,\"name\":\"ACME_Corporation\",\"description\":\"ACME Corporation Organization\",\"updated_at\":\"2012-06-01T22:13:49Z\",\"id\":1,\"cp_key\":\"ACME_Corporation\"}]"
+ http_version: "1.1"
diff --git a/spec/vcr/cassettes/katello-organization_environments.yml b/spec/vcr/cassettes/katello-organization_environments.yml
new file mode 100644
index 0000000..e469d58
--- /dev/null
+++ b/spec/vcr/cassettes/katello-organization_environments.yml
@@ -0,0 +1,63 @@
+---
+- !ruby/struct:VCR::HTTPInteraction
+ request: !ruby/struct:VCR::Request
+ method: :get
+ uri: http://admin:admin@example.com/katello/api/organizations/ACME_Corporation
+ body:
+ headers:
+ accept:
+ - application/json
+ response: !ruby/struct:VCR::Response
+ status: !ruby/struct:VCR::ResponseStatus
+ code: 200
+ message: OK
+ headers:
+ date:
+ - Tue, 05 Jun 2012 21:27:14 GMT
+ etag:
+ - "\"c6ac09fe3a8ec3005de97267c90be113\""
+ transfer-encoding:
+ - chunked
+ cache-control:
+ - max-age=0, private, must-revalidate
+ server:
+ - thin 1.2.11 codename Bat-Shit Crazy
+ x-runtime:
+ - "0.011012"
+ content-type:
+ - application/json; charset=utf-8
+ x-ua-compatible:
+ - IE=Edge,chrome=1
+ body: "{\"description\":\"ACME Corporation Organization\",\"created_at\":\"2012-06-01T22:13:49Z\",\"id\":1,\"cp_key\":\"ACME_Corporation\",\"updated_at\":\"2012-06-01T22:13:49Z\",\"name\":\"ACME_Corporation\",\"task_id\":null}"
+ http_version: "1.1"
+- !ruby/struct:VCR::HTTPInteraction
+ request: !ruby/struct:VCR::Request
+ method: :get
+ uri: http://admin:admin@example.com/katello/api/organizations/ACME_Corporation/environments
+ body:
+ headers:
+ accept:
+ - application/json
+ response: !ruby/struct:VCR::Response
+ status: !ruby/struct:VCR::ResponseStatus
+ code: 200
+ message: OK
+ headers:
+ date:
+ - Tue, 05 Jun 2012 21:27:14 GMT
+ etag:
+ - "\"0296c47e0755d9690d3e8d4d7769ad42\""
+ transfer-encoding:
+ - chunked
+ cache-control:
+ - max-age=0, private, must-revalidate
+ server:
+ - thin 1.2.11 codename Bat-Shit Crazy
+ x-runtime:
+ - "0.019975"
+ content-type:
+ - application/json; charset=utf-8
+ x-ua-compatible:
+ - IE=Edge,chrome=1
+ body: "[{\"organization_id\":1,\"id\":1,\"organization\":\"ACME_Corporation\",\"prior\":null,\"prior_id\":null,\"library\":true,\"created_at\":\"2012-06-01T22:13:50Z\",\"name\":\"Library\",\"updated_at\":\"2012-06-01T22:13:50Z\",\"description\":null},{\"organization_id\":1,\"id\":2,\"organization\":\"ACME_Corporation\",\"prior\":\"Library\",\"prior_id\":1,\"library\":false,\"created_at\":\"2012-06-01T22:15:15Z\",\"name\":\"DEV\",\"updated_at\":\"2012-06-01T22:15:15Z\",\"description\":null},{\"organization_id\":1,\"id\":3,\"organization\":\"ACME_Corporation\",\"prior\":\"DEV\",\"prior_id\":2,\"library\":false,\"created_at\":\"2012-06-01T22:15:19Z\",\"name\":\"TEST\",\"updated_at\":\"2012-06-01T22:15:19Z\",\"description\":null},{\"organization_id\":1,\"id\":4,\"organization\":\"ACME_Corporation\",\"prior\":\"TEST\",\"prior_id\":3,\"library\":false,\"created_at\":\"2012-06-01T22:15:22Z\",\"name\":\"PROD\",\"updated_at\":\"2012-06-01T22:15:22Z\",\"description\":null}]"
+ http_version: "1.1"
diff --git a/spec/vcr/cassettes/katello-organization_find.yml b/spec/vcr/cassettes/katello-organization_find.yml
new file mode 100644
index 0000000..1ef4085
--- /dev/null
+++ b/spec/vcr/cassettes/katello-organization_find.yml
@@ -0,0 +1,32 @@
+---
+- !ruby/struct:VCR::HTTPInteraction
+ request: !ruby/struct:VCR::Request
+ method: :get
+ uri: http://admin:admin@example.com/katello/api/organizations/ACME_Corporation
+ body:
+ headers:
+ accept:
+ - application/json
+ response: !ruby/struct:VCR::Response
+ status: !ruby/struct:VCR::ResponseStatus
+ code: 200
+ message: OK
+ headers:
+ date:
+ - Tue, 05 Jun 2012 21:27:14 GMT
+ etag:
+ - "\"bf37e4c063960a9afc590591c17af33f\""
+ transfer-encoding:
+ - chunked
+ cache-control:
+ - max-age=0, private, must-revalidate
+ server:
+ - thin 1.2.11 codename Bat-Shit Crazy
+ x-runtime:
+ - "0.022480"
+ content-type:
+ - application/json; charset=utf-8
+ x-ua-compatible:
+ - IE=Edge,chrome=1
+ body: "{\"created_at\":\"2012-06-01T22:13:49Z\",\"task_id\":null,\"name\":\"ACME_Corporation\",\"description\":\"ACME Corporation Organization\",\"updated_at\":\"2012-06-01T22:13:49Z\",\"id\":1,\"cp_key\":\"ACME_Corporation\"}"
+ http_version: "1.1"
diff --git a/spec/vcr/cassettes/katello-template_all.yml b/spec/vcr/cassettes/katello-template_all.yml
new file mode 100644
index 0000000..ff41554
--- /dev/null
+++ b/spec/vcr/cassettes/katello-template_all.yml
@@ -0,0 +1,30 @@
+---
+- !ruby/struct:VCR::HTTPInteraction
+ request: !ruby/struct:VCR::Request
+ method: :get
+ uri: http://admin:admin@example.com/katello/api/templates
+ body:
+ headers:
+ accept:
+ - application/json
+ response: !ruby/struct:VCR::Response
+ status: !ruby/struct:VCR::ResponseStatus
+ code: 404
+ message: Not Found
+ headers:
+ date:
+ - Tue, 05 Jun 2012 20:42:35 GMT
+ transfer-encoding:
+ - chunked
+ cache-control:
+ - no-cache
+ content-type:
+ - application/json; charset=utf-8
+ server:
+ - thin 1.2.11 codename Bat-Shit Crazy
+ x-ua-compatible:
+ - IE=Edge,chrome=1
+ x-runtime:
+ - "0.002226"
+ body: "{\"displayMessage\":\"Not found\",\"errors\":[\"Not found\"]}"
+ http_version: "1.1"
diff --git a/spec/vcr/cassettes/katello-template_deep_assoc.yml b/spec/vcr/cassettes/katello-template_deep_assoc.yml
new file mode 100644
index 0000000..6d001fb
--- /dev/null
+++ b/spec/vcr/cassettes/katello-template_deep_assoc.yml
@@ -0,0 +1,187 @@
+---
+- !ruby/struct:VCR::HTTPInteraction
+ request: !ruby/struct:VCR::Request
+ method: :get
+ uri: http://admin:admin@example.com/katello/api/organizations
+ body:
+ headers:
+ accept:
+ - application/json
+ response: !ruby/struct:VCR::Response
+ status: !ruby/struct:VCR::ResponseStatus
+ code: 200
+ message: OK
+ headers:
+ server:
+ - thin 1.2.11 codename Bat-Shit Crazy
+ x-runtime:
+ - "0.106914"
+ date:
+ - Tue, 05 Jun 2012 20:44:25 GMT
+ etag:
+ - "\"fad1b9c4d6957d58087758cf549f05f6\""
+ transfer-encoding:
+ - chunked
+ x-ua-compatible:
+ - IE=Edge,chrome=1
+ cache-control:
+ - max-age=0, private, must-revalidate
+ content-type:
+ - application/json; charset=utf-8
+ body: "[{\"created_at\":\"2012-06-01T22:13:49Z\",\"description\":\"ACME Corporation Organization\",\"updated_at\":\"2012-06-01T22:13:49Z\",\"name\":\"ACME_Corporation\",\"id\":1,\"cp_key\":\"ACME_Corporation\",\"task_id\":null}]"
+ http_version: "1.1"
+- !ruby/struct:VCR::HTTPInteraction
+ request: !ruby/struct:VCR::Request
+ method: :get
+ uri: http://admin:admin@example.com/katello/api/organizations/ACME_Corporation/environments
+ body:
+ headers:
+ accept:
+ - application/json
+ response: !ruby/struct:VCR::Response
+ status: !ruby/struct:VCR::ResponseStatus
+ code: 200
+ message: OK
+ headers:
+ server:
+ - thin 1.2.11 codename Bat-Shit Crazy
+ x-runtime:
+ - "0.020107"
+ date:
+ - Tue, 05 Jun 2012 20:44:25 GMT
+ etag:
+ - "\"d2947ee711e365155a4362c9fb592117\""
+ transfer-encoding:
+ - chunked
+ x-ua-compatible:
+ - IE=Edge,chrome=1
+ cache-control:
+ - max-age=0, private, must-revalidate
+ content-type:
+ - application/json; charset=utf-8
+ body: "[{\"prior\":null,\"description\":null,\"organization_id\":1,\"organization\":\"ACME_Corporation\",\"updated_at\":\"2012-06-01T22:13:50Z\",\"created_at\":\"2012-06-01T22:13:50Z\",\"prior_id\":null,\"id\":1,\"name\":\"Library\",\"library\":true},{\"prior\":\"Library\",\"description\":null,\"organization_id\":1,\"organization\":\"ACME_Corporation\",\"updated_at\":\"2012-06-01T22:15:15Z\",\"created_at\":\"2012-06-01T22:15:15Z\",\"prior_id\":1,\"id\":2,\"name\":\"DEV\",\"library\":false},{\"prior\":\"DEV\",\"description\":null,\"organization_id\":1,\"organization\":\"ACME_Corporation\",\"updated_at\":\"2012-06-01T22:15:19Z\",\"created_at\":\"2012-06-01T22:15:19Z\",\"prior_id\":2,\"id\":3,\"name\":\"TEST\",\"library\":false},{\"prior\":\"TEST\",\"description\":null,\"organization_id\":1,\"organization\":\"ACME_Corporation\",\"updated_at\":\"2012-06-01T22:15:22Z\",\"created_at\":\"2012-06-01T22:15:22Z\",\"prior_id\":3,\"id\":4,\"name\":\"PROD\",\"library\":false}]"
+ http_version: "1.1"
+- !ruby/struct:VCR::HTTPInteraction
+ request: !ruby/struct:VCR::Request
+ method: :get
+ uri: http://admin:admin@example.com/katello/api/environments/1/templates
+ body:
+ headers:
+ accept:
+ - application/json
+ response: !ruby/struct:VCR::Response
+ status: !ruby/struct:VCR::ResponseStatus
+ code: 200
+ message: OK
+ headers:
+ server:
+ - thin 1.2.11 codename Bat-Shit Crazy
+ x-runtime:
+ - "0.017856"
+ date:
+ - Tue, 05 Jun 2012 20:44:25 GMT
+ etag:
+ - "\"722d1e6f1635d4dc812ded613e965dd6\""
+ transfer-encoding:
+ - chunked
+ x-ua-compatible:
+ - IE=Edge,chrome=1
+ cache-control:
+ - max-age=0, private, must-revalidate
+ content-type:
+ - application/json; charset=utf-8
+ body: "[{\"name\":\"testaroo\",\"id\":1,\"parameters_json\":\"{}\",\"environment_id\":1,\"revision\":2,\"parent_id\":null,\"description\":\"Testing\",\"created_at\":\"2012-06-05T19:16:10Z\",\"updated_at\":\"2012-06-05T19:17:01Z\"}]"
+ http_version: "1.1"
+- !ruby/struct:VCR::HTTPInteraction
+ request: !ruby/struct:VCR::Request
+ method: :get
+ uri: http://admin:admin@example.com/katello/api/environments/1/templates
+ body:
+ headers:
+ accept:
+ - application/json
+ response: !ruby/struct:VCR::Response
+ status: !ruby/struct:VCR::ResponseStatus
+ code: 200
+ message: OK
+ headers:
+ server:
+ - thin 1.2.11 codename Bat-Shit Crazy
+ x-runtime:
+ - "0.107062"
+ date:
+ - Tue, 05 Jun 2012 20:44:25 GMT
+ etag:
+ - "\"52cc955a315b97f84567d78bd99c0795\""
+ transfer-encoding:
+ - chunked
+ x-ua-compatible:
+ - IE=Edge,chrome=1
+ cache-control:
+ - max-age=0, private, must-revalidate
+ content-type:
+ - application/json; charset=utf-8
+ body: "[{\"created_at\":\"2012-06-05T19:16:10Z\",\"parent_id\":null,\"parameters_json\":\"{}\",\"name\":\"testaroo\",\"description\":\"Testing\",\"updated_at\":\"2012-06-05T19:17:01Z\",\"id\":1,\"environment_id\":1,\"revision\":2}]"
+ http_version: "1.1"
+- !ruby/struct:VCR::HTTPInteraction
+ request: !ruby/struct:VCR::Request
+ method: :get
+ uri: https://admin:admin@example.com:443/katello/api/environments/1/templates
+ body:
+ headers:
+ accept:
+ - application/json
+ response: !ruby/struct:VCR::Response
+ status: !ruby/struct:VCR::ResponseStatus
+ code: 200
+ message: OK
+ headers:
+ server:
+ - thin 1.2.11 codename Bat-Shit Crazy
+ x-runtime:
+ - "0.016990"
+ date:
+ - Tue, 05 Jun 2012 20:44:26 GMT
+ etag:
+ - "\"6de6be4fa93e5b7a46d90f925d78046c\""
+ transfer-encoding:
+ - chunked
+ x-ua-compatible:
+ - IE=Edge,chrome=1
+ cache-control:
+ - max-age=0, private, must-revalidate
+ content-type:
+ - application/json; charset=utf-8
+ body: "[{\"description\":\"Testing\",\"revision\":2,\"created_at\":\"2012-06-05T19:16:10Z\",\"id\":1,\"updated_at\":\"2012-06-05T19:17:01Z\",\"name\":\"testaroo\",\"parent_id\":null,\"environment_id\":1,\"parameters_json\":\"{}\"}]"
+ http_version: "1.1"
+- !ruby/struct:VCR::HTTPInteraction
+ request: !ruby/struct:VCR::Request
+ method: :get
+ uri: https://admin:admin@example.com:443/katello/api/environments/1/templates
+ body:
+ headers:
+ accept:
+ - application/json
+ response: !ruby/struct:VCR::Response
+ status: !ruby/struct:VCR::ResponseStatus
+ code: 200
+ message: OK
+ headers:
+ server:
+ - thin 1.2.11 codename Bat-Shit Crazy
+ x-runtime:
+ - "0.017672"
+ date:
+ - Tue, 05 Jun 2012 20:44:26 GMT
+ etag:
+ - "\"7f0cfad929a5a4fb7a406ef7e1f4f8e7\""
+ transfer-encoding:
+ - chunked
+ x-ua-compatible:
+ - IE=Edge,chrome=1
+ cache-control:
+ - max-age=0, private, must-revalidate
+ content-type:
+ - application/json; charset=utf-8
+ body: "[{\"id\":1,\"parameters_json\":\"{}\",\"parent_id\":null,\"created_at\":\"2012-06-05T19:16:10Z\",\"name\":\"testaroo\",\"environment_id\":1,\"updated_at\":\"2012-06-05T19:17:01Z\",\"description\":\"Testing\",\"revision\":2}]"
+ http_version: "1.1"
diff --git a/spec/vcr/cassettes/katello-template_environments.yml b/spec/vcr/cassettes/katello-template_environments.yml
new file mode 100644
index 0000000..6a1e2e4
--- /dev/null
+++ b/spec/vcr/cassettes/katello-template_environments.yml
@@ -0,0 +1,94 @@
+---
+- !ruby/struct:VCR::HTTPInteraction
+ request: !ruby/struct:VCR::Request
+ method: :get
+ uri: http://admin:admin@example.com/katello/api/environments/1
+ body:
+ headers:
+ accept:
+ - application/json
+ response: !ruby/struct:VCR::Response
+ status: !ruby/struct:VCR::ResponseStatus
+ code: 200
+ message: OK
+ headers:
+ date:
+ - Tue, 05 Jun 2012 20:42:35 GMT
+ transfer-encoding:
+ - chunked
+ cache-control:
+ - max-age=0, private, must-revalidate
+ content-type:
+ - application/json; charset=utf-8
+ etag:
+ - "\"9bda784b267cb943c54f526a8fb4d749\""
+ server:
+ - thin 1.2.11 codename Bat-Shit Crazy
+ x-ua-compatible:
+ - IE=Edge,chrome=1
+ x-runtime:
+ - "0.023065"
+ body: "{\"created_at\":\"2012-06-01T22:13:50Z\",\"organization\":\"ACME_Corporation\",\"organization_id\":1,\"prior\":null,\"prior_id\":null,\"library\":true,\"description\":null,\"updated_at\":\"2012-06-01T22:13:50Z\",\"name\":\"Library\",\"id\":1}"
+ http_version: "1.1"
+- !ruby/struct:VCR::HTTPInteraction
+ request: !ruby/struct:VCR::Request
+ method: :get
+ uri: http://admin:admin@example.com/katello/api/environments/1/templates
+ body:
+ headers:
+ accept:
+ - application/json
+ response: !ruby/struct:VCR::Response
+ status: !ruby/struct:VCR::ResponseStatus
+ code: 200
+ message: OK
+ headers:
+ date:
+ - Tue, 05 Jun 2012 20:42:35 GMT
+ transfer-encoding:
+ - chunked
+ cache-control:
+ - max-age=0, private, must-revalidate
+ content-type:
+ - application/json; charset=utf-8
+ etag:
+ - "\"7bf9448abc448198f5ef79931505261c\""
+ server:
+ - thin 1.2.11 codename Bat-Shit Crazy
+ x-ua-compatible:
+ - IE=Edge,chrome=1
+ x-runtime:
+ - "0.019452"
+ body: "[{\"parameters_json\":\"{}\",\"description\":\"Testing\",\"updated_at\":\"2012-06-05T19:17:01Z\",\"environment_id\":1,\"created_at\":\"2012-06-05T19:16:10Z\",\"id\":1,\"revision\":2,\"name\":\"testaroo\",\"parent_id\":null}]"
+ http_version: "1.1"
+- !ruby/struct:VCR::HTTPInteraction
+ request: !ruby/struct:VCR::Request
+ method: :get
+ uri: http://admin:admin@example.com/katello/api/environments/1/templates
+ body:
+ headers:
+ accept:
+ - application/json
+ response: !ruby/struct:VCR::Response
+ status: !ruby/struct:VCR::ResponseStatus
+ code: 200
+ message: OK
+ headers:
+ date:
+ - Tue, 05 Jun 2012 20:42:35 GMT
+ transfer-encoding:
+ - chunked
+ cache-control:
+ - max-age=0, private, must-revalidate
+ content-type:
+ - application/json; charset=utf-8
+ etag:
+ - "\"722d1e6f1635d4dc812ded613e965dd6\""
+ server:
+ - thin 1.2.11 codename Bat-Shit Crazy
+ x-ua-compatible:
+ - IE=Edge,chrome=1
+ x-runtime:
+ - "0.019380"
+ body: "[{\"name\":\"testaroo\",\"id\":1,\"parameters_json\":\"{}\",\"environment_id\":1,\"revision\":2,\"parent_id\":null,\"description\":\"Testing\",\"created_at\":\"2012-06-05T19:16:10Z\",\"updated_at\":\"2012-06-05T19:17:01Z\"}]"
+ http_version: "1.1"
--
1.7.7.6
More information about the aeolus-devel
mailing list