Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bWmkd-00086O-Sk for pgadmin-hackers@arkaria.postgresql.org; Mon, 08 Aug 2016 15:46:04 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bWmkd-0000VT-Fd for pgadmin-hackers@arkaria.postgresql.org; Mon, 08 Aug 2016 15:46:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bWmkc-0000UE-P9 for pgadmin-hackers@postgresql.org; Mon, 08 Aug 2016 15:46:02 +0000 Received: from mail-io0-x22c.google.com ([2607:f8b0:4001:c06::22c]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bWmkY-00056j-1v for pgadmin-hackers@postgresql.org; Mon, 08 Aug 2016 15:46:02 +0000 Received: by mail-io0-x22c.google.com with SMTP id m101so360956611ioi.2 for ; Mon, 08 Aug 2016 08:45:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=E52XHySLleetvCWtwY/SbRz6apP1swdcIB8UHuOZ3S4=; b=pl559HF0KLyuaqWgiFYr4x0qq4/f/GfZ5+92ZdvohzWBws+NFt020mXD6rmdRNxB10 qgvPFf1za4nHEAmcnww6ZKUzY+MuYHQj/ZYfnQGWMiw8MuvnICy/2/U5xBMSIzJ9SVMQ ZbVme7b97iMWyHIWxEH6YQxN/Gdrv3XvTzRXZUQiHm4q7Xk+JKdQhsdSC3r9FNapvV1q mGPENVmOzteKPiIA3HKjB6TW8/qjZcgvmrlVNUxndRmPCjMy7uoeMnzKg16p+WUhzXur FWv718Dlbu5KCzSneamcJ+H5uaQ53hQIl3dEf84LeApL6T+i1j2kvGHC5zrIw6+3k7Ly LgmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=E52XHySLleetvCWtwY/SbRz6apP1swdcIB8UHuOZ3S4=; b=N3yWJXS2uIWvFpW3OsVyprioKnnH8xK1VwyBhSeU0enkO2yob24pTrQFR7I0kqsaeu H1MIaDIlu94GUOmR1Km9QXvZH+/DcWuHIJptU4fL3LplunOie0hz24loiq+AkAL2OtF0 rV1lHmHOoz8NC+jqbA2nGhLLzOIq0yQ0dJGTXGM3lirpSTL0cSCkWS9FDFaFZXXei81H S3khdZ3pMcsmDGcm0HK6YUmAQjjH1DHto51jRZE0Nq9df/qs0bdPKfYbV+YZx9nzHBh7 BE+eW4/JZJDNfQ+KHDBi7iUZob50z46ET+jFOSgqTHNOaDjMFi8R4Xnl+Kd18F8MEPhF fZnQ== X-Gm-Message-State: AEkoouuAcsx895hQedcNIgchKNeFqoW27gvjWYFwpJQMeRz0pKsLFWGc+xxYBIcEm35tz7G/Kz5x4IU1qGrpF2vP6VEtocL4ycrtBbtnnmERxLqUuFjzYA0aPMmlnwuCEZCJUu9NDJu+3ZcoXJM11OAMax+XWTLNN1w6Jp3MBSgJxWynpOX7IspxgW6iWRN6NbhzAC3N8w== X-Received: by 10.107.36.5 with SMTP id k5mr6030415iok.104.1470671155678; Mon, 08 Aug 2016 08:45:55 -0700 (PDT) Received: from mail-io0-f176.google.com (mail-io0-f176.google.com. [209.85.223.176]) by smtp.gmail.com with ESMTPSA id q1sm10417755itb.2.2016.08.08.08.45.55 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Aug 2016 08:45:55 -0700 (PDT) Received: by mail-io0-f176.google.com with SMTP id b62so361233052iod.3 for ; Mon, 08 Aug 2016 08:45:55 -0700 (PDT) X-Received: by 10.107.183.85 with SMTP id h82mr97408616iof.63.1470671153069; Mon, 08 Aug 2016 08:45:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.208.97 with HTTP; Mon, 8 Aug 2016 08:45:51 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Mon, 8 Aug 2016 16:45:51 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: pgAdmin IV : Unittest modular patch To: Navnath Gadakh Cc: pgadmin-hackers , Kanchan Mohitey Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org Hi I guess you need to test if tablespace_path is omitted, not just empty? This function test the add tablespace scenario (Check Tablespace Node) ... = ERROR =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ERROR: setUpClass (pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_put.Tab= leSpaceUpdateTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers= /tablespaces/tests/test_tbspc_put.py", line 48, in setUpClass cls.server_group, cls.server_ids) File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers= /tablespaces/tests/utils.py", line 122, in add_table_space data =3D get_tablespace_data(server_connect) File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers= /tablespaces/tests/utils.py", line 41, in get_tablespace_data config_test_data['spc_location'] =3D server_config['tablespace_path'] KeyError: 'tablespace_path' =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ERROR: setUpClass (pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_delete.= TableSpaceDeleteTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers= /tablespaces/tests/test_tbspc_delete.py", line 46, in setUpClass cls.server_group, cls.server_ids) File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers= /tablespaces/tests/utils.py", line 122, in add_table_space data =3D get_tablespace_data(server_connect) File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers= /tablespaces/tests/utils.py", line 41, in get_tablespace_data config_test_data['spc_location'] =3D server_config['tablespace_path'] KeyError: 'tablespace_path' =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ERROR: setUpClass (pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_get.Tab= lespaceGetTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers= /tablespaces/tests/test_tbspc_get.py", line 45, in setUpClass cls.server_group, cls.server_ids) File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers= /tablespaces/tests/utils.py", line 122, in add_table_space data =3D get_tablespace_data(server_connect) File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers= /tablespaces/tests/utils.py", line 41, in get_tablespace_data config_test_data['spc_location'] =3D server_config['tablespace_path'] KeyError: 'tablespace_path' =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ERROR: runTest (pgadmin.browser.server_groups.servers.tablespaces.tests.tes= t_tbspc_add.TableSpaceAddTestCase) This function test the add tablespace scenario (Check Tablespace Node) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers= /tablespaces/tests/test_tbspc_add.py", line 47, in runTest self.server_ids) File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers= /tablespaces/tests/utils.py", line 122, in add_table_space data =3D get_tablespace_data(server_connect) File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers= /tablespaces/tests/utils.py", line 41, in get_tablespace_data config_test_data['spc_location'] =3D server_config['tablespace_path'] KeyError: 'tablespace_path' ---------------------------------------------------------------------- Ran 14 tests in 9.326s FAILED (errors=3D4) On Mon, Aug 8, 2016 at 3:07 PM, Navnath Gadakh wrote: > Hi Dave, > Please find the updated patch for API unit test cases for Roles and > Tablespaces nodes > As we finalized > Now, > 1. The user will specify the tablespace path in test_config.json.in > 2. If tablespace path not found, skip the test cases for that > server(Only tablespace test cases) > 3. Add the skipped test summary in the test result. (Now it's showing= on > console + in log file, but need to update in a final enhanced test summary > report. Which is research point we will work on that after finishing all > nodes API test cases) > 4. Removed the test_ prefix from the values in the config files. > > Thanks! > > > On Thu, Aug 4, 2016 at 5:55 PM, Dave Page > wrote: >> >> On Thu, Aug 4, 2016 at 1:02 PM, Navnath Gadakh >> wrote: >> > Hi Dave, >> > >> > On Thu, Aug 4, 2016 at 4:04 PM, Dave Page >> > wrote: >> >> >> >> Hi >> >> >> >> On Thu, Aug 4, 2016 at 10:27 AM, Navnath Gadakh >> >> wrote: >> >> >> >> >> Oh - does the per-server config override the main config? That's >> >> >> useful. So anything that's in test_advanced_config.py can be >> >> >> overridden on a per-server basis in test_config.py? >> >> > >> >> > No. >> >> > per-server i.e advance config(test_advanced_config.json.in) and >> >> > main >> >> > config(test_config.json) both are different files. In main config we >> >> > just >> >> > mention the server=E2=80=99s credentials.(We can also mention per s= erver >> >> > credentails) and in test_advanced_config.json.in(here we say >> >> > per-server >> >> > config) >> >> > we mention the advanced configurations i.e. test data for each node. >> >> >> >> OK. >> >> >> >> > So, let's summarize the discussion: >> >> > - Let user specify the tablespace path in >> >> > test_advanced_config.json.in >> >> >> >> No - test_config.py. It should be per-server. >> > >> > We don't have a file named 'test_config.py' but we have a server's >> > credential file named 'test_config.json'. >> > So, you are saying the tablespace path to be added in >> > 'test_config.json'. >> > Am I correct? >> >> Yeah, sorry. It should be a property of the server configuration. >> >> >> -- >> Dave Page >> VP, Chief Architect, Tools & Installers >> EnterpriseDB: http://www.enterprisedb.com >> The Enterprise PostgreSQL Company >> >> Blog: http://pgsnake.blogspot.com >> Twitter: @pgsnake > > > > > -- > Thanks, > Navnath Gadakh > Software Engineer > EnterpriseDB Corporation > Mobile: +91 9975389878 > > --=20 Dave Page VP, Chief Architect, Tools & Installers EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company Blog: http://pgsnake.blogspot.com Twitter: @pgsnake --=20 Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers