Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hlvk7-0007Lm-Ec for pgadmin-hackers@arkaria.postgresql.org; Fri, 12 Jul 2019 13:37:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hlvk6-0005lA-9d for pgadmin-hackers@arkaria.postgresql.org; Fri, 12 Jul 2019 13:37:42 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hlvk5-0005l3-Sd for pgadmin-hackers@lists.postgresql.org; Fri, 12 Jul 2019 13:37:42 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hlvk2-00079o-TT for pgadmin-hackers@postgresql.org; Fri, 12 Jul 2019 13:37:40 +0000 Received: by mail-wm1-x341.google.com with SMTP id s3so8983275wms.2 for ; Fri, 12 Jul 2019 06:37:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1jsOCyBjcBz7LtNWpIGSGpKT1n2kVCv6nSW7DQwpNc0=; b=k1J1gSCmqayP43EbSEgZw7NJQxIco8IL+rnB+i17cdl1M6MLhfBAtNH4yTvGzGeOXv x+SLW0m5+aQeWK0Tu97bU7OW0j5/pABb7UKWWM4XxkS5WVJMhE9vQ1U34BWwfDHMbJNl d1TtAQ4lc68EIvAyVK6ja41UjyO0QLeUx51iwUi7cEuKVpJkEnS1Bqr636iEhWaM+p7F kr86MsYuz/aTEUBVhYFuhamZf+xNghGTI8bgCVcD5JKtdBfqvYdVXio24ojO3pduzh6U SVitvDCucqbTH0JPviZNjgcxYPY8i5L6Zo5bnpMH+SjDiiiquhN5OfBVPYUEbiXeGPL7 2TSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1jsOCyBjcBz7LtNWpIGSGpKT1n2kVCv6nSW7DQwpNc0=; b=q2DRgb47fA5sTv/qOee2154n8YLXbrgJfPgP9rL2z2jgCd4dgXUT6MRFvu0QibFwus 4zYmZSRF4KuOEE6xKJg7kAC9mtYHL3kIYl+ls+gsqMVlMm3J3+XddvXWAmoXCbnHSkFQ KBteGOhvB9OqbLCf/uNS5rJBoB7muhKaEkYkZFF+SayhtnN4AK1cggPP4fFKBv5bdVmY F9KgVVoqQRobJEgyvpJfc1Wu1rTL6wXBI91dDOqEVxJHuO3G/fmBgHMYKsKqlO2yEqML +fQZL67zZcS6GN1s1LPxiuqy3rhdgOQVgYAawh6l56gZ9i1EfSIg9fvqDnBLZOifOSS7 g+tw== X-Gm-Message-State: APjAAAWZGgOoVXymkdB3RnYsHSdGRwjrn2cPz8y7SbkY6Dk1Z/nfeICx bccc1bbpPqZarFDNY8mCOc7hRlePRGr54RZE3WfxfQ== X-Google-Smtp-Source: APXvYqzr1i4QKcEbu5AOR2R2F/GNT4sDgZn/CwMV8lIQ9ll0VFJsn0PPGZrrAk1BR+dk+TRKC3I19tf0T6PLww7Zi9Y= X-Received: by 2002:a1c:107:: with SMTP id 7mr9936354wmb.84.1562938656513; Fri, 12 Jul 2019 06:37:36 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Dave Page Date: Fri, 12 Jul 2019 14:37:16 +0100 Message-ID: Subject: Re: [pgAdmin4][Patch] : RE-SQL tests for Collation node To: Khushboo Vashi Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary="0000000000006d6cd9058d7c03f4" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --0000000000006d6cd9058d7c03f4 Content-Type: text/plain; charset="UTF-8" Thanks, applied. On Fri, Jul 12, 2019 at 11:54 AM Khushboo Vashi < khushboo.vashi@enterprisedb.com> wrote: > Hi Dave, > > Please find the attached updated patch. > > On Fri, Jul 12, 2019 at 4:07 PM Dave Page wrote: > >> Hi >> >> On Fri, Jul 12, 2019 at 10:46 AM Khushboo Vashi < >> khushboo.vashi@enterprisedb.com> wrote: >> >>> Hi, >>> >>> Please find the attached patch for the RE-SQL tests for collation node. >>> This patch also includes the *modified SQL tests* as well as fixes for >>> the RE-SQL in the collation node which I found while implementing this. >>> >>> To add the modified SQL tests, 2 optional parameters are introduced in >>> the JSON file, i.e. >>> *msql_endpoint* and *expected_msql_file.* >>> These parameters need to be included in the Alter scenarios. >>> >>> I have modified the RE-SQL framework to support modified SQL. >>> >> >> This fails on EPAS 9.4: >> >> ... 2019-07-12 11:35:09,672: ERROR flask.app: Failed to execute query >> (execute_scalar) for the server #5 - DB:test_db_18bdb (Query-id: 9091709): >> Error Message:ERROR: role "postgres" does not exist >> >> Create Collation... FAIL >> Traceback (most recent call last): >> File >> "/Users/dpage/git/pgadmin4/web/regression/re_sql/tests/test_resql.py", line >> 205, in execute_test_case >> self.assertEquals(response.status_code, 200) >> File >> "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py", >> line 1338, in deprecated_func >> return original_func(*args, **kwargs) >> File >> "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py", >> line 839, in assertEqual >> assertion_func(first, second, msg=msg) >> File >> "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py", >> line 832, in _baseAssertEqual >> raise self.failureException(msg) >> AssertionError: 500 != 200 >> ERROR >> >> Fixed. > >> I guess we need to create a role first? >> >> Also, please keep your error messages consistent with the others, e.g. >> "... FAIL" instead of " ..................FAIL". >> >> Removed. > >> Thanks! >> >> > Thanks, > Khushboo > >> -- >> Dave Page >> Blog: http://pgsnake.blogspot.com >> Twitter: @pgsnake >> >> EnterpriseDB UK: http://www.enterprisedb.com >> The Enterprise PostgreSQL Company >> > -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company --0000000000006d6cd9058d7c03f4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks, applied.

On Fri, Jul 12, 2019 at 11:54 AM Khushboo = Vashi <khushboo.vashi= @enterprisedb.com> wrote:
Hi Dave,

Please = find the attached updated patch.

On Fri, Jul 12, 2019 at 4:07 PM Dave Page &l= t;dpage@pgadmin.org<= /a>> wrote:
<= div dir=3D"ltr">
Hi

Hi,

Please find the attached patch for the RE-SQL tests for collation node.
This patch also includes the modified SQL tests as well as = fixes for the RE-SQL in the collation node which I found while implementing= this.

To add the modified SQL tests, 2 optional p= arameters are introduced in the JSON file, i.e.
msql_endpoi= nt and expected_msql_file.
These parameters= need to be included in the Alter scenarios.

I hav= e modified the RE-SQL framework to support modified SQL.

This fails on EPAS 9.4:

= =C2=A0... 2019-07-12 11:35:09,672: ERROR flask.app: Failed to execute query= (execute_scalar) for the server #5 - DB:test_db_18bdb (Query-id: 9091709):=
Error Message:ERROR: =C2=A0role "postgres" does not exist
=
Create Collation... FAIL
Traceback (most recent call last):
=C2= =A0 File "/Users/dpage/git/pgadmin4/web/regression/re_sql/tests/test_r= esql.py", line 205, in execute_test_case
=C2=A0 =C2=A0 self.assertE= quals(response.status_code, 200)
=C2=A0 File "/opt/local/Library/Fr= ameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py"= , line 1338, in deprecated_func
=C2=A0 =C2=A0 return original_func(*args= , **kwargs)
=C2=A0 File "/opt/local/Library/Frameworks/Python.frame= work/Versions/3.7/lib/python3.7/unittest/case.py", line 839, in assert= Equal
=C2=A0 =C2=A0 assertion_func(first, second, msg=3Dmsg)
=C2=A0 F= ile "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/p= ython3.7/unittest/case.py", line 832, in _baseAssertEqual
=C2=A0 = =C2=A0 raise self.failureException(msg)
AssertionError: 500 !=3D 200
= ERROR

Fixed.
I guess we need to create a role first?

Also, please keep your error messages consistent wit= h the others, e.g. "... FAIL" instead of " .................= .FAIL".

Removed.=C2= =A0
Thanks!
=C2=A0
<= /div>
Thanks,
Khushboo=C2=A0
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
<= /div>


--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @p= gsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL = Company
--0000000000006d6cd9058d7c03f4--