Return-Path: X-Original-To: apmail-deltacloud-dev-archive@www.apache.org Delivered-To: apmail-deltacloud-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A24E2E6DF for ; Tue, 4 Dec 2012 08:43:22 +0000 (UTC) Received: (qmail 64622 invoked by uid 500); 4 Dec 2012 08:43:22 -0000 Delivered-To: apmail-deltacloud-dev-archive@deltacloud.apache.org Received: (qmail 64586 invoked by uid 500); 4 Dec 2012 08:43:22 -0000 Mailing-List: contact dev-help@deltacloud.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@deltacloud.apache.org Delivered-To: mailing list dev@deltacloud.apache.org Received: (qmail 64578 invoked by uid 99); 4 Dec 2012 08:43:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Dec 2012 08:43:22 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lutter@redhat.com designates 209.132.183.28 as permitted sender) Received: from [209.132.183.28] (HELO mx1.redhat.com) (209.132.183.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Dec 2012 08:43:14 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qB48grft005616 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 4 Dec 2012 03:42:53 -0500 Received: from melon.com (ovpn-116-23.sin2.redhat.com [10.67.116.23]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qB48gghN030733 for ; Tue, 4 Dec 2012 03:42:52 -0500 From: lutter@redhat.com To: dev@deltacloud.apache.org Subject: [PATCH 5/6] CIMI tests: allow setting the Content-Type header for requests Date: Tue, 4 Dec 2012 00:42:33 -0800 Message-Id: <1354610554-26032-6-git-send-email-lutter@redhat.com> In-Reply-To: <1354610554-26032-1-git-send-email-lutter@redhat.com> References: <1354610554-26032-1-git-send-email-lutter@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-Virus-Checked: Checked by ClamAV on apache.org From: David Lutterkort --- tests/cimi/test_helper.rb | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/tests/cimi/test_helper.rb b/tests/cimi/test_helper.rb index fccfcbc..e967e55 100644 --- a/tests/cimi/test_helper.rb +++ b/tests/cimi/test_helper.rb @@ -181,12 +181,15 @@ module CIMI::Test::Methods def headers(params) headers = api.auth_header if params[:accept] - headers["Accept"] = "application/#{params.delete(:accept)}" + headers["Accept"] = "application/#{params[:accept]}" else # @content_type is set by the harness below # if it isn't, default to XML headers["Accept"] = @content_type || "application/xml" end + if params[:content_type] + headers["Content-Type"] = "application/#{params[:content_type]}" + end headers end -- 1.7.7.6