Обсуждение: [pgadmin4][patch] Unit test fail on GreenPlum (#3190)

Поиск
Список
Период
Сортировка

[pgadmin4][patch] Unit test fail on GreenPlum (#3190)

От
Joao De Almeida Pereira
Дата:
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.

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
Вложения

Re: [pgadmin4][patch] Unit test fail on GreenPlum (#3190)

От
Dave Page
Дата:
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

Re: [pgadmin4][patch] Unit test fail on GreenPlum (#3190)

От
Joao De Almeida Pereira
Дата:
Hello,
Can you point out an example?
Thanks

On Sat, Mar 10, 2018, 3:53 PM Dave Page <dpage@pgadmin.org> 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

Re: [pgadmin4][patch] Unit test fail on GreenPlum (#3190)

От
Dave Page
Дата:
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 <dpage@pgadmin.org> 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

Re: [pgadmin4][patch] Unit test fail on GreenPlum (#3190)

От
Joao De Almeida Pereira
Дата:
Hi

Attached you can find the patch that instead of using the json configuration, connects to the database to retrieve the type and then check if the test should be skipped or not.

Thanks
Victoria & Joao

On Sun, Mar 11, 2018 at 8:20 PM Dave Page <dpage@pgadmin.org> wrote:
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 <dpage@pgadmin.org> 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
Вложения

Re: [pgadmin4][patch] Unit test fail on GreenPlum (#3190)

От
Dave Page
Дата:
Thanks, applied.

On Tue, Mar 13, 2018 at 2:19 PM, Joao De Almeida Pereira <jdealmeidapereira@pivotal.io> wrote:
Hi

Attached you can find the patch that instead of using the json configuration, connects to the database to retrieve the type and then check if the test should be skipped or not.

Thanks
Victoria & Joao

On Sun, Mar 11, 2018 at 8:20 PM Dave Page <dpage@pgadmin.org> wrote:
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 <dpage@pgadmin.org> 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



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

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company