From nobody Wed Jan 15 10:19:15 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of ovirt.org designates 66.187.230.42 as permitted sender) client-ip=66.187.230.42; envelope-from=kimchi-devel-bounces@ovirt.org; helo=lists.ovirt.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of ovirt.org designates 66.187.230.42 as permitted sender) smtp.mailfrom=kimchi-devel-bounces@ovirt.org; Return-Path: Received: from lists.ovirt.org (lists.phx.ovirt.org [66.187.230.42]) by mx.zohomail.com with SMTPS id 1486659996382622.3249917793328; Thu, 9 Feb 2017 09:06:36 -0800 (PST) Received: from lists.phx.ovirt.org (localhost [127.0.0.1]) by lists.ovirt.org (Postfix) with ESMTP id 1A64D8205C2; Thu, 9 Feb 2017 17:06:34 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lists.ovirt.org (Postfix) with ESMTPS id 4E52A82059B for ; Thu, 9 Feb 2017 17:06:02 +0000 (UTC) Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v19H0d4j017361 for ; Thu, 9 Feb 2017 12:06:01 -0500 Received: from e24smtp03.br.ibm.com (e24smtp03.br.ibm.com [32.104.18.24]) by mx0b-001b2d01.pphosted.com with ESMTP id 28gsbhhunq-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 09 Feb 2017 12:06:01 -0500 Received: from localhost by e24smtp03.br.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 9 Feb 2017 15:05:59 -0200 Received: from d24dlp02.br.ibm.com (9.18.248.206) by e24smtp03.br.ibm.com (10.172.0.139) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 9 Feb 2017 15:05:57 -0200 Received: from d24relay04.br.ibm.com (d24relay04.br.ibm.com [9.18.232.146]) by d24dlp02.br.ibm.com (Postfix) with ESMTP id D92A31DC006D for ; Thu, 9 Feb 2017 12:05:57 -0500 (EST) Received: from d24av04.br.ibm.com (d24av04.br.ibm.com [9.8.31.97]) by d24relay04.br.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v19H5uFl32571542 for ; Thu, 9 Feb 2017 15:05:56 -0200 Received: from d24av04.br.ibm.com (localhost [127.0.0.1]) by d24av04.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id v19H5utN024692 for ; Thu, 9 Feb 2017 15:05:56 -0200 Received: from t440.ibm.com ([9.85.191.221]) by d24av04.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id v19H5olI024581; Thu, 9 Feb 2017 15:05:55 -0200 X-Original-To: kimchi-devel@ovirt.org From: Lucio Correia To: Kimchi Devel Date: Thu, 9 Feb 2017 15:05:44 -0200 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1486659944-20332-1-git-send-email-luciojhc@linux.vnet.ibm.com> References: <1486659944-20332-1-git-send-email-luciojhc@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17020917-0024-0000-0000-00000151BE9E X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17020917-0025-0000-0000-00001615E36E Message-Id: <1486659944-20332-3-git-send-email-luciojhc@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-02-09_11:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1702090153 Subject: [Kimchi-devel] [PATCH] [Kimchi 2/2] Remove test for HTTP error 413 X-BeenThere: kimchi-devel@ovirt.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: kimchi-devel-bounces@ovirt.org Errors-To: kimchi-devel-bounces@ovirt.org X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Python requests httplib is not prepared to handle 413 errors as required by Cherrypy like nginx is, thus it will not return error 413 when HTTP request data is bigger than max_body_size. Signed-off-by: Lucio Correia --- tests/test_model_storagevolume.py | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/tests/test_model_storagevolume.py b/tests/test_model_storagevo= lume.py index 638751a..b1d03dd 100644 --- a/tests/test_model_storagevolume.py +++ b/tests/test_model_storagevolume.py @@ -173,26 +173,6 @@ def _do_volume_test(self, model, pool_name): # Upload volume content url =3D 'http://%s:%s' % (HOST, PORT) + uri + '/' + filename =20 - # Create a file with 5M to upload - # Max body size is set to 4M so the upload will fail with 413 - newfile =3D '/tmp/5m-file' - with open(newfile, 'wb') as fd: - fd.seek(5*1024*1024-1) - fd.write("\0") - rollback.prependDefer(os.remove, newfile) - - with open(newfile, 'rb') as fd: - with open(newfile + '.tmp', 'wb') as tmp_fd: - data =3D fd.read() - tmp_fd.write(data) - - with open(newfile + '.tmp', 'rb') as tmp_fd: - r =3D requests.put(url, data=3D{'chunk_size': len(data= )}, - files=3D{'chunk': tmp_fd}, - verify=3DFalse, - headers=3Dfake_auth_header()) - self.assertEquals(r.status_code, 413) - # Do upload index =3D 0 chunk_size =3D 2 * 1024 --=20 2.7.4 _______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel