From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: * X-Spam-ASN: AS33070 50.56.128.0/17 X-Spam-Status: No, score=1.3 required=5.0 tests=AWL,RDNS_NONE,T_DKIM_INVALID shortcircuit=no autolearn=no version=3.3.2 X-Original-To: archivist@yhbt.net Delivered-To: archivist@dcvr.yhbt.net Received: from rubyforge.org (unknown [50.56.192.79]) by dcvr.yhbt.net (Postfix) with ESMTP id AC80C1F5B5 for ; Fri, 7 Jun 2013 03:09:42 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 596872E154; Fri, 7 Jun 2013 03:09:42 +0000 (UTC) X-Original-To: mongrel-unicorn@rubyforge.org Delivered-To: mongrel-unicorn@rubyforge.org Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by rubyforge.org (Postfix) with ESMTP id AD90C2E14B for ; Fri, 7 Jun 2013 03:09:35 +0000 (UTC) Received: from compute6.internal (compute6.nyi.mail.srv.osa [10.202.2.46]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id AD53620556 for ; Thu, 6 Jun 2013 23:03:28 -0400 (EDT) Received: from frontend1.nyi.mail.srv.osa ([10.202.2.160]) by compute6.internal (MEProxy); Thu, 06 Jun 2013 23:03:28 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=micahchalmer.net; h=from:content-type:content-transfer-encoding:subject:date :message-id:to:mime-version; s=mesmtp; bh=/bH4YoRFn1oHhOG+FOC2/U SrO2M=; b=BUuduEuMrCCezvJ3d2H8xM+UaT4QTjdtg7BLAWCgHbbGoaYaxLd/z6 FQVifhA9C2v7vlupNQbCErp8kcQgKioVufmZXXSL1K2yULBAv46kEzmTVktmT5qt 5uek+i/xl6u2uXH1UQe4rTZVwAA1TF/pX8VEHWKwE5ARki7zPdkfw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=from:content-type :content-transfer-encoding:subject:date:message-id:to :mime-version; s=smtpout; bh=/bH4YoRFn1oHhOG+FOC2/USrO2M=; b=VhC +0Le7IiV8zvLeWdbMJB7mxCibE35jM2/Heruu7JSn5gmr13D7m6plSos7svWP4q5 XG7kMYM6lOGyji1xNHK/MvyDbQ8VpsLqqlDdiKlLwFccfHmq+qn6ND+bqrCNkJ4g mIlm90DSgVUP5V9C69MK9Da9uvVZ5Y8boM6pXBME= X-Sasl-enc: +IX3d5rwUgk0B/VsL/v2gqiyw/VI+1sB8eyFuxwKVEGV 1370574208 Received: from [192.168.1.12] (unknown [68.49.114.188]) by mail.messagingengine.com (Postfix) with ESMTPA id 770E4C00008 for ; Thu, 6 Jun 2013 23:03:28 -0400 (EDT) From: Micah Chalmer Subject: [PATCH 1/2] Integration test for --no-default-middleware option Date: Thu, 6 Jun 2013 23:03:32 -0400 Message-Id: <5690F44F-E5B5-4D5D-9DDE-44689B1A02AD@micahchalmer.net> To: mongrel-unicorn@rubyforge.org Mime-Version: 1.0 (Apple Message framework v1283) X-Mailer: Apple Mail (2.1283) X-BeenThere: mongrel-unicorn@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: mongrel-unicorn-bounces@rubyforge.org Errors-To: mongrel-unicorn-bounces@rubyforge.org This adds an integration test to ensure that the -N option continues to function as documented. --- t/fails-rack-lint.ru | 5 +++++ t/t0300-no-default-middleware.sh | 15 +++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 t/fails-rack-lint.ru create mode 100644 t/t0300-no-default-middleware.sh diff --git a/t/fails-rack-lint.ru b/t/fails-rack-lint.ru new file mode 100644 index 0000000..82bfb5f --- /dev/null +++ b/t/fails-rack-lint.ru @@ -0,0 +1,5 @@ +# This rack app returns an invalid status code, which will cause +# Rack::Lint to throw an exception if it is present. This +# is used to check whether Rack::Lint is in the stack or not. + +run lambda {|env| return [42, {}, ["Rack::Lint wasn't there if you see this"]]} diff --git a/t/t0300-no-default-middleware.sh b/t/t0300-no-default-middleware.sh new file mode 100644 index 0000000..2e8f8f8 --- /dev/null +++ b/t/t0300-no-default-middleware.sh @@ -0,0 +1,15 @@ +#!/bin/sh +. ./test-lib.sh +t_plan 2 "test the -N / --no-default-middleware option" + +t_begin "setup and start" && { + unicorn_setup + unicorn -N -D -c $unicorn_config fails-rack-lint.ru + unicorn_wait_start +} + +t_begin "check exit status with Rack::Lint not present" && { + test 42 -eq "$(curl -sf -o/dev/null -w'%{http_code}' http://$listen/)" +} + +t_done -- 1.8.2 _______________________________________________ Unicorn mailing list - mongrel-unicorn@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-unicorn Do not quote signatures (like this one) or top post when replying