From patchwork Sun Dec 1 15:05:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Finucane X-Patchwork-Id: 1202876 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47Qs4X6R0nz9sP3 for ; Mon, 2 Dec 2019 02:05:32 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=that.guru Authentication-Results: ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=that.guru header.i=@that.guru header.b="tHPDQ5X0"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 47Qs4T3TwQzDqXZ for ; Mon, 2 Dec 2019 02:05:29 +1100 (AEDT) X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=that.guru (client-ip=199.181.239.236; helo=relay0236.mxlogin.com; envelope-from=stephen@that.guru; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=that.guru Authentication-Results: lists.ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=that.guru header.i=@that.guru header.b="tHPDQ5X0"; dkim-atps=neutral Received: from relay0236.mxlogin.com (relay0236.mxlogin.com [199.181.239.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 47Qs4L29VkzDqXD for ; Mon, 2 Dec 2019 02:05:21 +1100 (AEDT) Received: from filter004.mxroute.com (unknown [94.130.183.33]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay0236.mxlogin.com (Postfix) with ESMTPS id A945BCD3031E for ; Sun, 1 Dec 2019 09:05:17 -0600 (CST) Received: from one.mxroute.com (one.mxroute.com [195.201.59.211]) by filter004.mxroute.com (Postfix) with ESMTPS id 5E9AD3EAD7 for ; Sun, 1 Dec 2019 15:05:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=that.guru; s=default; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject: Cc:To:From:Sender:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=SXnPeI0QvPXtk/i0HzB3mbSNzwABMR0GaBZiQrH+cxI=; b=tHPDQ5X0DTNVOWYtfKEEaHRmMs uQq0w9zIeakZVCgOV9HK1KFFobD9TF9nNim4ZBhP7mzSCeQIrZRY2PAsS2Jy3oHloDI1uuD4LBeBe pLyzoRPyX3zVUW3+F6CeCfAmKytWA5rwpyRGrS0vVjay0SVK8RwhYA2Cmdprd10ib4mwLii/f0Umd QOXlDVajo3ZuulyQduhe5H//Mf5BIeCrMmkzD4ZVtJWmpck9EIJHX9MeBfzndzaxkKTsQDoEPamii 4WDQdS9+LFPTJyofZmxcUSkIhi5cEFQRKzPfcH7DGurUalMCo64m1IIT10SaTet6ADZF66fsFs76f 8QQ1WQQQ==; From: Stephen Finucane To: patchwork@lists.ozlabs.org Subject: [PATCH 1/2] settings: Add configuration for sqlite DB backend Date: Sun, 1 Dec 2019 15:05:05 +0000 Message-Id: <20191201150506.91389-1-stephen@that.guru> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-AuthUser: stephen@that.guru X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" Signed-off-by: Stephen Finucane --- patchwork/settings/dev.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/patchwork/settings/dev.py b/patchwork/settings/dev.py index e110e745..c5afe0d5 100644 --- a/patchwork/settings/dev.py +++ b/patchwork/settings/dev.py @@ -51,6 +51,13 @@ DATABASES = { if os.getenv('PW_TEST_DB_TYPE', None) == 'postgres': DATABASES['default']['ENGINE'] = 'django.db.backends.postgresql_psycopg2' DATABASES['default']['HOST'] = os.getenv('PW_TEST_DB_HOST', '') +elif os.getenv('PW_TEST_DB_TYPE', None) == 'sqlite': + DATABASES['default']['ENGINE'] = 'django.db.backends.sqlite3' + DATABASES['default']['NAME'] = '/dev/shm/patchwork.test.db.sqlite3' + del DATABASES['default']['HOST'] + del DATABASES['default']['PORT'] + del DATABASES['default']['USER'] + del DATABASES['default']['PASSWORD'] EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' From patchwork Sun Dec 1 15:05:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Finucane X-Patchwork-Id: 1202877 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47Qs4y45J3z9sP3 for ; Mon, 2 Dec 2019 02:05:54 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=that.guru Authentication-Results: ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=that.guru header.i=@that.guru header.b="Nnua9TJ2"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 47Qs4w51vwzDqYB for ; Mon, 2 Dec 2019 02:05:52 +1100 (AEDT) X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=that.guru (client-ip=172.82.139.142; helo=qrelay142.mxroute.com; envelope-from=stephen@that.guru; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=that.guru Authentication-Results: lists.ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=that.guru header.i=@that.guru header.b="Nnua9TJ2"; dkim-atps=neutral Received: from qrelay142.mxroute.com (qrelay142.mxroute.com [172.82.139.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 47Qs4L4HwKzDqXJ for ; Mon, 2 Dec 2019 02:05:22 +1100 (AEDT) Received: from filter004.mxroute.com (unknown [116.203.155.46]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by qrelay142.mxroute.com (Postfix) with ESMTPS id 369C112097D for ; Sun, 1 Dec 2019 10:05:19 -0500 (EST) Received: from one.mxroute.com (one.mxroute.com [195.201.59.211]) by filter004.mxroute.com (Postfix) with ESMTPS id AB3333EAD8 for ; Sun, 1 Dec 2019 15:05:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=that.guru; s=default; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=H2H9Anq8Ea06jFGAfFSl8vS1ga2dr6wIIygQyrKNPaA=; b=Nnua9TJ20oxD6A27n8Lg7FNDdL 3eraUusRrM2WTXfZ9cR2AWyPCc9cXkmWqo7oA1mq5z/Nd/ailo7EkB6EixmZdZJgOn1MY1+AWrFX0 O2QDU6jTt3eyl0sW0fhKP4ZrwLq8SW37n9NxCMLSck3EA6WOF7x4xIf6bCx26bbK6abzSxa0zNHdV 4OLsXnTdBKXb9U8xQmQ/EOMMh2XyZOct9TaAwyzihWNo0u90+o92sINiYYTgp0OHdD4lyX7hsoY3N iN3MaY4Ly6RzWyxeE+3ohcUjs2sCTDMXaNLzCcOc1wuJjIXoZWK65kvBraHdk1rrh9jPtcyFpK7uT RQOHg7kQ==; From: Stephen Finucane To: patchwork@lists.ozlabs.org Subject: [PATCH 2/2] tests: Skip tests that fail on SQLite DB backend Date: Sun, 1 Dec 2019 15:05:06 +0000 Message-Id: <20191201150506.91389-2-stephen@that.guru> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191201150506.91389-1-stephen@that.guru> References: <20191201150506.91389-1-stephen@that.guru> MIME-Version: 1.0 X-AuthUser: stephen@that.guru X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" These are failing due to differences in behavior of the backend. Since this will never be used for production, we can simply skip these unit tests and rely on the CI to catch potential issues. Signed-off-by: Stephen Finucane --- patchwork/tests/test_list.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/patchwork/tests/test_list.py b/patchwork/tests/test_list.py index 1c0503fa..c6ccd0d7 100644 --- a/patchwork/tests/test_list.py +++ b/patchwork/tests/test_list.py @@ -4,8 +4,10 @@ # SPDX-License-Identifier: GPL-2.0-or-later from datetime import datetime as dt +import unittest import re +from django.conf import settings from django.test import TestCase from django.urls import reverse from django.utils.six.moves import zip @@ -95,6 +97,14 @@ class PatchOrderTest(TestCase): self._test_sequence(response, test_fn) + # TODO(stephenfin): Looks like this has been resolved in Django 2.1 [1]? If + # not, it should be possible [2] + # + # [1] https://code.djangoproject.com/ticket/30248 + # [2] https://michaelsoolee.com/case-insensitive-sorting-sqlite/ + @unittest.skipIf('sqlite3' in settings.DATABASES['default']['ENGINE'], + 'The sqlite3 backend does not support case insensitive ' + 'ordering') def test_submitter_order(self): url = reverse('patch-list', kwargs={'project_id': self.project.linkname}) @@ -106,6 +116,9 @@ class PatchOrderTest(TestCase): self._test_sequence(response, test_fn) + @unittest.skipIf('sqlite3' in settings.DATABASES['default']['ENGINE'], + 'The sqlite3 backend does not support case insensitive ' + 'ordering') def test_submitter_reverse_order(self): url = reverse('patch-list', kwargs={'project_id': self.project.linkname})