Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bSQ2H-0002nL-08 for pgadmin-hackers@arkaria.postgresql.org; Wed, 27 Jul 2016 14:42:13 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bSQ2G-0003yz-F1 for pgadmin-hackers@arkaria.postgresql.org; Wed, 27 Jul 2016 14:42:12 +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 1bSQ2F-0003yq-Pv for pgadmin-hackers@postgresql.org; Wed, 27 Jul 2016 14:42:11 +0000 Received: from mail-io0-x22d.google.com ([2607:f8b0:4001:c06::22d]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bSQ2B-0000Vv-JW for pgadmin-hackers@postgresql.org; Wed, 27 Jul 2016 14:42:10 +0000 Received: by mail-io0-x22d.google.com with SMTP id q83so72507605iod.1 for ; Wed, 27 Jul 2016 07:42:07 -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=vjtxX6ISqfuhftg/Ligt+vB8ASkCl8kcND05byTfxgc=; b=oFuEXzehwgdTRzweg8f0TZQ5ltJvDzMS+2CegGyV+ZQxhh44kPSOEsWNzGtBVzKe/l Ed1O+s3fnFYK1zl+6IEt5CQ1a9BOKp7izQ4iUoCqmnp7bswahskXsMqlb4MRrg/Iq095 CmzBDbYmlMYUbKhOe6fYAecXmwBiswHFSRqrOb6b5dBbpbtadhp5Y143eF9sDfXaKDc9 OD2CgIGWsG1JRIynEw9cOs5v0lJCsdjLtzYMGIRJfpUYY19E+C7Z7CJuoPeqVJah7yCr O5OtVn/KjH0vLmrHTwRRaJdEMZB2CfNd3we8gsbR460GPEqT5SvEwghmBQzRq0+OkHF1 /QqA== 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=vjtxX6ISqfuhftg/Ligt+vB8ASkCl8kcND05byTfxgc=; b=B1wLRkHaBuXCnq4N+NyIhT9koWX3qfDw00hcVoeqqABh2QjET5z9Yz38e2bgbocXDe 7Jrk6E0fhnNCxnLUpra8xS+KSF0SlrjY1PIJwOX/njjp6AQ+B1bSOxZ3coBN1uFTQANg gJtmO1eZcv1QmVdnJ3HsRgX2wQBwdbgEvSGODY1oIF/IaCvDHq0m3DZ4+QhJT36+0r7t Sbo/SPR4jjvUKThFlAyR+i5JvjxOQ6YJhkHdpLwE+6CGR6OnEdqahb2ciYOB+7zTsQvZ eCg6tjmXQdXs7nnX4gU0VxqvdQDW6cnwdNeAhMR8i+eGgYnxUFBABu9fd4uxielSWKLv U5AA== X-Gm-Message-State: AEkooutrFxHE8cdOAwbbe0byXzgra53RkPCJsVCn6XZsuXGhIrciivMoEOISwL2BKZP9K/jwN0nzUvCEiOUfFSQ0titwjuvSoTMs96nJdVW4MjqAmhnnVPeWP06ad7u/KkAWw9l40BOUo5MuxDYOl+1kMS4XdCbMnTEUIM4SOmSCsnf7G/nLpHDT8kmeRZLgwACZmqVilw== X-Received: by 10.107.170.13 with SMTP id t13mr33254127ioe.2.1469630525481; Wed, 27 Jul 2016 07:42:05 -0700 (PDT) Received: from mail-io0-f173.google.com (mail-io0-f173.google.com. [209.85.223.173]) by smtp.gmail.com with ESMTPSA id e201sm13740393itc.21.2016.07.27.07.42.04 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Jul 2016 07:42:04 -0700 (PDT) Received: by mail-io0-f173.google.com with SMTP id m101so72033581ioi.2 for ; Wed, 27 Jul 2016 07:42:04 -0700 (PDT) X-Received: by 10.107.183.85 with SMTP id h82mr33894056iof.63.1469630523721; Wed, 27 Jul 2016 07:42:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.208.97 with HTTP; Wed, 27 Jul 2016 07:42:02 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Wed, 27 Jul 2016 15:42:02 +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 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. 2) Is the test count in the summary correct when you have multiple servers? I think it might be resetting between servers. 3) Please ensure that test databases that are created are also dropped again. I'm getting tired of deleting them manually! 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 w= rote: >> 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 nee= d 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.js= on.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 chang= e 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.ResetPasswordTe= stCase) >> 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_p= assword.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...

\n

= You >> 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.ResetPasswordTe= stCase) >> 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_p= assword.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...

\n

= You >> 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.ResetPasswordTe= stCase) >> 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_p= assword.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...

\n

= You >> 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 --=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