Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1evBCZ-0001My-1V for pgadmin-hackers@arkaria.postgresql.org; Mon, 12 Mar 2018 00:20:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1evBCV-0007BN-Iy for pgadmin-hackers@arkaria.postgresql.org; Mon, 12 Mar 2018 00:20:27 +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.89) (envelope-from ) id 1evBCV-0007BD-AG for pgadmin-hackers@lists.postgresql.org; Mon, 12 Mar 2018 00:20:27 +0000 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1evBCR-0006ay-1W for pgadmin-hackers@postgresql.org; Mon, 12 Mar 2018 00:20:26 +0000 Received: by mail-wr0-x241.google.com with SMTP id d10so1512508wrf.3 for ; Sun, 11 Mar 2018 17:20:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=+aU1MQpLp2eyU0WGmgA0v7kOhcbRlTA0fYHJdvnhqPQ=; b=nIPKzXxOH/qz8c2g5ZZm1EcgFYnDmLCLNt77lIVZRJt0ix0lh56vIcqvx7vojUqNb2 Jn/qA/Zhk1H2hmaC13UJkyEPsaJdsm3hMySZvL61ek/3IIFQSZU9SDTVNXTWPo2Ym/bG rB+nFbH3/lebVRylPCps9w5c83eFpHOcUx7LWN/VJmC2reCrMMJZIGp3DbcZy6ayBNCm KPKFPPDxQq9gDGB11spepbwIWkA9w5CkyM6Ok5zbh/JPQsh/X/g+Ejef840XWE3pjMtR iJD0FTqgREgXB9WcrzEyzsTW1SQPAvzpjbie0H65vXHHhPj2bMd/ipNFEeI/p0p7hh/Q 4MHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=+aU1MQpLp2eyU0WGmgA0v7kOhcbRlTA0fYHJdvnhqPQ=; b=ZvTwm9XRQH0rvO3ZmqJNxA7ejtnohe34ZMgGQvCm083EExupjqHvjRk+egdwo72t6i 2tv089cqf+YXy3VH8W5INtdlTHO7qZGTdXkGEX7E9rEhrtdB8j5mURypjWIvRy9c6cIZ 6HJwm2DQSYGFCnxzkP+qabVvLifzDd+OjpxMh6LR6pCbGd+NY2+Q2k5Zus1Htfcr8weM oDadhwLkVpMmmD/OG/OEWapMp6VUsWQMimjropVsVuVLemV1Y/R1wfdP+r8rMLSv8O1i O/7oORiHlLAplmCUuXfio+u7F5XaHHivFRv+H/yraidUcTwGPcLS/i+v4K6Ft8yDj3aX cnoA== X-Gm-Message-State: AElRT7G7EyxhxYOGpgEYiFodmnnmp1aDtAR2pnrBpvw1pn+dr1DUwm33 nSCzGTZJLMb+RtIFoYZaBwQ/6kCXtE7NdyCTLxXUKQ== X-Google-Smtp-Source: AG47ELtoPF5f59PJ1g+xOfx6JZCH8R6e6NNSQmenJpAHzjE2DByg2qS6wlEHD1IuZHhuUJhby2eA6bfNUYhtXFARzrQ= X-Received: by 10.223.153.215 with SMTP id y81mr4602998wrb.144.1520814019408; Sun, 11 Mar 2018 17:20:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.109.7 with HTTP; Sun, 11 Mar 2018 17:20:18 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Sun, 11 Mar 2018 20:20:18 -0400 Message-ID: Subject: Re: [pgadmin4][patch] Unit test fail on GreenPlum (#3190) To: Joao De Almeida Pereira Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary="f403045ce2ea658ba805672c1b0c" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --f403045ce2ea658ba805672c1b0c Content-Type: text/plain; charset="UTF-8" Hi On Sun, Mar 11, 2018 at 7:22 PM, Joao De Almeida Pereira < jdealmeidapereira@pivotal.io> wrote: > Hello, > Can you point out an example? > Thanks > See the setUp function in test_resource_groups_add.py: if "type" in server_con["data"]: if server_con["data"]["type"] == "pg": message = "Resource groups are not supported by PG." self.skipTest(message) else: if server_con["data"]["version"] < 90400: message = "Resource groups are not supported by PPAS 9.3" \ " and below." self.skipTest(message) > > > On Sat, Mar 10, 2018, 3:53 PM Dave Page wrote: > >> Hi >> >> On Friday, March 9, 2018, Joao De Almeida Pereira < >> jdealmeidapereira@pivotal.io> wrote: >> >>> Hello Hackers, >>> >>> Attached you can find the patch that skip some tests and correct issues >>> on SQL that are failing when trying to connect to a GreenPlum database. >>> >>> We did this by adding a attribute to to test_json called "db_type" that >>> will carry the type of database we are running tests against. >>> >> >> Any reason we can't do that dynamically as we do with the EPAS-specific >> tests? >> >> >>> >>> When we run tests against a GreenPlum instance the configuration would >>> look like this: >>> >>> { >>> "name": "GreenPlum", >>> "comment": "GreenPlum DB", >>> "db_username": "gp", >>> "host": "localhost", >>> "db_password": "", >>> "db_port": 5433, >>> "maintenance_db": "postgres", >>> "sslmode": "prefer", >>> "tablespace_path": "", >>> "enabled": true, >>> "db_type": "gpdb" >>> } >>> >>> >>> >>> >>> Thanks >>> Joao >>> >> >> >> -- >> 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 --f403045ce2ea658ba805672c1b0c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi

On Sun, Mar 11, 2018 at 7:22 PM, Joao De Almeida Pereira <jde= almeidapereira@pivotal.io> wrote:
Hello,
Can you point out an example?
Thanks

See the setUp function in te= st_resource_groups_add.py:

=C2=A0 =C2=A0 =C2= =A0 =C2=A0 if "type" in server_con["data"]:
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if server_con["data"][&= quot;type"] =3D=3D "pg":
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 message =3D "Resource groups are not s= upported by PG."
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 self.skipTest(message)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 else:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 if server_con["data"]["version"] < 90400:=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 message =3D "Resource groups are not supported by PPAS 9.3"= ; \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 " and below."
=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = self.skipTest(message)
=C2=A0


On Sat, Mar 10, 2018, 3:53 PM Dave Pag= e <dpage@pgadmin.= org> wrote:
Hi

On Friday, March 9, 2018, Joao De Almeida Pereira <jdealmeidapereir= a@pivotal.io> wrote:
Hello Hackers,

Attached you can f= ind the patch that skip some tests and correct issues on SQL that are faili= ng when trying to connect to a GreenPlum database.

We did this by adding a attribute to to test_json called "db_type&quo= t; that will carry the type of database we are running tests against.
=

Any reason we can't do that dyna= mically as we do with the EPAS-specific tests?
=C2=A0

When we run tests against a GreenPlum instance the configuration woul= d look like this:
{
"name"<= span style=3D"color:rgb(204,120,50)">: "GreenPlum"= ,
"comment": "GreenPlum = DB",
"db_username": "gp",
"host":
"localhost",=
"db_password": ""<= /span>,
"db= _port": 5433,
"maintenance_db": &quo= t;postgres",
"sslmode": = "prefer",
"tablespace_pa= th": "",
"enabled": true,
"db_type": "gpdb"
}



Thanks
= Joao


--
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 Compan= y
--f403045ce2ea658ba805672c1b0c--