Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bSfUn-0003ZQ-TB for pgadmin-hackers@arkaria.postgresql.org; Thu, 28 Jul 2016 07:12:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bSfUn-0001PL-BK for pgadmin-hackers@arkaria.postgresql.org; Thu, 28 Jul 2016 07:12:41 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bSfUl-0001PC-KR for pgadmin-hackers@postgresql.org; Thu, 28 Jul 2016 07:12:39 +0000 Received: from mail-qk0-x22f.google.com ([2607:f8b0:400d:c09::22f]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bSfUd-0006Bw-Kb for pgadmin-hackers@postgresql.org; Thu, 28 Jul 2016 07:12:38 +0000 Received: by mail-qk0-x22f.google.com with SMTP id o67so55184020qke.1 for ; Thu, 28 Jul 2016 00:12:31 -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=5oj+YxbKlaYybGb/1l7O2a6+7LjsQ72RuthPuPqDkD4=; b=Bz29GouM1b6GR8qr7SWoAuw2MCbZ2BK8BIdVe/1VsjkgybwKmqdnV2mP2fTUIVXz0L I+XeE8T9IY0r4uKGX/T2RgG+w94YiM/L4XgRlv+Mgrkb62dzptEbOgwuqlbEFMCylOlh vBAwXpB5vQMxcV/HhU3DPqwrcX+DZcyoJSeK4X8DUDuw6KgeRvtqu7WV01rGemjlpB5S 2tWc/S4g0QshF1u3iYG5ioVcmzgmQ0fI7O5WKdwehvHRFythMODmtMmjIJcrXtSv0nJj U+7WwA45wWFrwpJhfaGvAMUVJvfuFHa+aBSKUvEGaZzf1qKcvDmS4+JbaRCP5ezAJ8+X xbbw== 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=5oj+YxbKlaYybGb/1l7O2a6+7LjsQ72RuthPuPqDkD4=; b=iBiD6pl6xQWDlcvb7DvuRQ3DIPBIFZxcj4zvx31Hlr2CJ4YDnKSydBcU4J6PiKrFk3 5sbL5L+kOuKd0BQlxhy0zHPOH/18kLX5xee2h0ZfmFAfYNhhfty00vGTyb2TGOuiy2Hr FOtCZSNYjP7XZjljaIQ0ofPTjKKBOGahFkX9xf9SCawi0sKRr3+zu3Gn/7eyDrQHDXu3 L+MSP9AHKUb1vpL7YgVQFFdv8sQZU7EAgNKk/gwPFf8wPDuoB9AqIsdDAdH7JRa07exK THaNyEB9RnfKZj8Jf9p5dJWeauGR4SvOJuCh85qMRlfQZnFvcGy5DXJ4g5HRjs3Qt3Ix bbLg== X-Gm-Message-State: AEkoouv+yn0VjaE4lxoeD5EgpnAtxZV4sUyLeV6z7hZlzhVcyqnvtqBdhY3L1eiCtHT1b2FOd4aeJ6y7/zeaDIgT X-Received: by 10.55.75.207 with SMTP id y198mr39360401qka.57.1469689950496; Thu, 28 Jul 2016 00:12:30 -0700 (PDT) MIME-Version: 1.0 Received: by 10.200.41.90 with HTTP; Thu, 28 Jul 2016 00:12:29 -0700 (PDT) In-Reply-To: References: From: Navnath Gadakh Date: Thu, 28 Jul 2016 12:42:29 +0530 Message-ID: Subject: Re: pgAdmin IV : Unittest modular patch To: Dave Page 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 Thanks Dave! On Wed, Jul 27, 2016 at 8:12 PM, Dave Page wro= te: > Ahh, that explains it. Nice catch! It's working in both server and > desktop modes now :-). > > I've committed the patch, but can you please look at the following issues: > > 1) When testing SMTP, the encoded password used to connect to the > server is displayed in both the logs and stdout (the "send: 'AUTH > PLAIN ....'" lines). Can you catch that, and replace it with *'s > please? Sooner or later someone will reveal a password otherwise. Sure. I will implement in the next patch. > > 2) Is the test count in the summary correct when you have multiple > servers? I think it might be resetting between servers. In the current code runTest() function calls only one time for single/multiple server/s that's why it's showing same count for both (single & multiple). Question: What exactly we are looking for, only count? Or we need any more logs like for adding database, it should display in which server (PG/PPAS) its adding database if this is the case we need a feasibility check. > > 3) Please ensure that test databases that are created are also dropped > again. I'm getting tired of deleting them manually! I already added delete databases in tearDown () function, But yeah, I found two test cases where this code missed. I will add this in the next patch. > > Thanks, Dave. > > On Wed, Jul 27, 2016 at 1:19 PM, Navnath Gadakh > wrote: >> Hi Dave, >> We have reproduced the issue you mentioned in the previous >> email. We need to skip the login related test cases when SERVER_MODE =3D >> False in the web/config_local.py. >> >> Please find the revised patch for the same. >> >> Thanks! >> >> >> On Fri, Jul 22, 2016 at 9:48 PM, Dave Page = wrote: >>> Hi >>> >>> On Fri, Jul 22, 2016 at 2:22 PM, Navnath Gadakh >>> wrote: >>>> Hi Dave, >>>> >>>> Please find the attached patch for pgAdmin4 unittest(Support of API >>>> testing with different servers i.e. PG and PPAS). >>>> >>>> This patch includes- >>>> >>>> Test framework support API testing with multiple server for this we ne= ed to >>>> modify test_config.json(for user it=E2=80=99s test_config.json.in) and >>>> test_advanced_config.json(for user it=E2=80=99s test_advanced_config.j= son.in). >>>> Server details of PG and PPAS are included in both .in files. >>>> >>>> Removed the logic of logging in the test client on each test scenario= (As >>>> per Khushboo's comment in previous email). We need this logic in test= cases >>>> under =E2=80=98browser/tests/=E2=80=99 as for test scenarios like chan= ge password and >>>> invalid login test cases as test client should be logged out first. So= , as >>>> per this the code is slightly modified in =E2=80=98browser/tests/=E2= =80=99. >>> >>> OK in principle, but it doesn't seem to work: >>> >>> This function will add the server under default server group. (Default >>> Server Node url) ... ok >>> >>> =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 >>> FAIL: runTest (pgadmin.browser.tests.test_reset_password.ResetPasswordT= estCase) >>> This function checks reset password functionality. (TestCase for >>> Validating Empty Email) >>> ---------------------------------------------------------------------- >>> Traceback (most recent call last): >>> File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/tests/test_reset_= password.py", >>> line 44, in runTest >>> 'utf-8')) >>> AssertionError: 'Recover pgAdmin 4 Password' not found in u'>> HTML PUBLIC "-//W3C//DTD HTML 3.2 >>> Final//EN">\nRedirecting...\n

Redirecting...

\nYou >>> should be redirected automatically to target URL: /. >>> If not click the link.' >>> >>> =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 >>> FAIL: runTest (pgadmin.browser.tests.test_reset_password.ResetPasswordT= estCase) >>> This function checks reset password functionality. (TestCase for >>> Validating Invalid_Email) >>> ---------------------------------------------------------------------- >>> Traceback (most recent call last): >>> File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/tests/test_reset_= password.py", >>> line 44, in runTest >>> 'utf-8')) >>> AssertionError: 'Recover pgAdmin 4 Password' not found in u'>> HTML PUBLIC "-//W3C//DTD HTML 3.2 >>> Final//EN">\nRedirecting...\n

Redirecting...

\nYou >>> should be redirected automatically to target URL: /. >>> If not click the link.' >>> >>> =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 >>> FAIL: runTest (pgadmin.browser.tests.test_reset_password.ResetPasswordT= estCase) >>> This function checks reset password functionality. (TestCase for >>> Validating Valid_Email) >>> ---------------------------------------------------------------------- >>> Traceback (most recent call last): >>> File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/tests/test_reset_= password.py", >>> line 44, in runTest >>> 'utf-8')) >>> AssertionError: 'Recover pgAdmin 4 Password' not found in u'>> HTML PUBLIC "-//W3C//DTD HTML 3.2 >>> Final//EN">\nRedirecting...\n

Redirecting...

\nYou >>> should be redirected automatically to target URL: /. >>> If not click the link.' >>> >>> ---------------------------------------------------------------------- >>> Ran 26 tests in 30.109s >>> >>> FAILED (failures=3D3) >>> >>> It's very far from obvious what's wrong here (/reset looks just fine >>> to me). How can we get more useful info out of the framework? >>> >>> -- >>> 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 > > > > -- > Dave Page > VP, Chief Architect, Tools & Installers > EnterpriseDB: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake --=20 Thanks, Navnath Gadakh Software Engineer EnterpriseDB Corporation Mobile: +91 9975389878 --=20 Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers