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 1evOLg-00059P-JZ for pgadmin-hackers@arkaria.postgresql.org; Mon, 12 Mar 2018 14:22:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1evOLf-0004I2-Bm for pgadmin-hackers@arkaria.postgresql.org; Mon, 12 Mar 2018 14:22:47 +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.89) (envelope-from ) id 1evOLe-0004H0-ME for pgadmin-hackers@lists.postgresql.org; Mon, 12 Mar 2018 14:22:47 +0000 Received: from mail-ot0-x243.google.com ([2607:f8b0:4003:c0f::243]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1evOLV-0004u8-GP for pgadmin-hackers@postgresql.org; Mon, 12 Mar 2018 14:22:45 +0000 Received: by mail-ot0-x243.google.com with SMTP id y11so15438217otg.0 for ; Mon, 12 Mar 2018 07:22:37 -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; bh=0BAiz33G6aqRkpoFy40ujdBhI1eqxucUkoI5/6qdr60=; b=BZKxi1XzKGRt8FS5xlW8440oj8e2lEKgMzeBO7MO+hXWK3Q/Nm1JFXB2vCjPUMowId 20bsnF2fIFIAlAOeehBWJ7NTgOSKBsYVAbgLEc1i7sGr2CvII+gak/Yd4pTvs7jL/Sx0 R19mzwg3Guo5t2KMKh8CyEGZheS7wmj75fiu1CCEjl+h47xtbFCUDBLSVC9sd9GV86Y0 tJwkHto7NkP6vVYL0GvmGFaqQHXrAHcY3d9eWU5KubHtlvolGi07+xIGE84dSddGQDBD n+/nkN5W8TAexFgqN3KjVWSG3wdAEmmz/dYmupi044XpH0g6nO7BY1c7HSdM9eaMYN1U r74w== 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=0BAiz33G6aqRkpoFy40ujdBhI1eqxucUkoI5/6qdr60=; b=dsEFNyUq4N+kbmUH1/V8cWCNiBijZYyMI10N4pYmCbKdHmt280ySn4KttXyIpOOIfd VIPxE4j4uULpNxIKHffrX0LxoD1yqd0irDpGxSKJ1y4t4pEwoV8NR3cAS73E1RrA2E5V Gqnc39ozEFUW0mGmuMrvquYeNV8AzNjfon4j9W1pceQqEvoC12duEClMb3VbtLokJkq1 4adBuBDsv2yrBmIqvMVktweGArDMvWS+IFrGrFKv7etiFSRrlbfWDS/KOGqgjkp57GDt ISlR+5OEijhie0SyotEnak0qeZP/8MJTJyVCsLQhZk9cP3IzRUxabDoS58YZzp8ubyDy FYOQ== X-Gm-Message-State: AElRT7GJcwsQOr6g9pT/Z35MvGVdqH2TvcjojfjHigJA1vXUXxP7orAY LBFAeD8kgb/ORIDxr93UaQVhMM29wtrGnbGXTouKFA== X-Google-Smtp-Source: AG47ELvNhE4NmcQbWG0IXsIQcIbVVxbsUGrnafMT8+Ndi2b6UIx8ni2rMuVXQ7OSHxUCIGofLthfwwuTQypyDtLplH4= X-Received: by 10.157.94.18 with SMTP id d18mr5894229oti.386.1520864556242; Mon, 12 Mar 2018 07:22:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.74.8.150 with HTTP; Mon, 12 Mar 2018 07:22:15 -0700 (PDT) In-Reply-To: References: From: Murtuza Zabuawala Date: Mon, 12 Mar 2018 19:52:15 +0530 Message-ID: Subject: Re: pgAdmin 4 commit: Support for external tables in GPDB. Fixes #3168 To: Joao De Almeida Pereira Cc: Neel Patel , pgadmin-hackers , Dave Page Content-Type: multipart/alternative; boundary="089e082c7f84a07abe056737dfd6" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --089e082c7f84a07abe056737dfd6 Content-Type: text/plain; charset="UTF-8" Hi Dave, Joao's patch is pending, would you please do the needful? I also encounter similar issue on Windows while running tests. -- Regards, Murtuza Zabuawala EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company On Tue, Mar 6, 2018 at 8:25 PM, Joao De Almeida Pereira < jdealmeidapereira@pivotal.io> wrote: > Hello Neel, > > You can find attached the corrections of the path's needed for windows. > The fix should correct TestExternalTablesView and TestTemplateCreate but > for the ChangePasswordTestCase I need more information to help you out. We > need to understand what is the response that the endpoint > /user_management/user is returning. > > Thanks > Joao > > On Tue, Mar 6, 2018 at 2:29 AM Neel Patel > wrote: > >> Hi Joao, >> >> I ran the testsuite in windows 10 with Python 3.4 and it fails for >> external tables. Linux it is working fine. Let me know if I miss >> anything. >> >> Please check the below logs. >> >> python runtests.py --pkg browser --exclude feature_tests >> >> ######## >> >> ====================================================================== >> ERROR: runTest (pgadmin.browser.server_groups.servers.databases. >> schemas.tables.tests.test_template_create.TestTemplateCreate) >> When rendering GreenPlum 5.3 template, when no distribution is present, >> when no primary key is present, it returns "DISTRIBUTED RANDOMLY" >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File "C:\Projects\pgadmin4\web\pgadmin\browser\server_groups\ >> servers\databases\schemas\tables\tests\test_template_create.py", line >> 99, in runTest >> self.template_path, **self.input_parameters) >> File "C:\Projects\venv_pgadmin4_py_3_4\lib\site-packages\flask\templating.py", >> line 133, in render_template >> return _render(ctx.app.jinja_env.get_or_select_template(template_ >> name_or_list), >> File "C:\Projects\venv_pgadmin4_py_3_4\lib\site-packages\jinja2\environment.py", >> line 830, in get_or_select_template >> return self.get_template(template_name_or_list, parent, globals) >> File "C:\Projects\venv_pgadmin4_py_3_4\lib\site-packages\jinja2\environment.py", >> line 791, in get_template >> return self._load_template(name, self.make_globals(globals)) >> File "C:\Projects\venv_pgadmin4_py_3_4\lib\site-packages\jinja2\environment.py", >> line 765, in _load_template >> template = self.loader.load(self, name, globals) >> File "C:\Projects\venv_pgadmin4_py_3_4\lib\site-packages\jinja2\loaders.py", >> line 113, in load >> source, filename, uptodate = self.get_source(environment, name) >> File "C:\Projects\venv_pgadmin4_py_3_4\lib\site-packages\flask\templating.py", >> line 57, in get_source >> return self._get_source_fast(environment, template) >> File "C:\Projects\venv_pgadmin4_py_3_4\lib\site-packages\flask\templating.py", >> line 85, in _get_source_fast >> raise TemplateNotFound(template) >> jinja2.exceptions.TemplateNotFound: table\sql\gpdb_5.0_plus\create.sql >> >> ====================================================================== >> ERROR: runTest (pgadmin.browser.server_groups.servers.databases. >> schemas.tables.tests.test_template_create.TestTemplateCreate) >> When rendering GreenPlum 5.3 template, when no distribution is present, >> when primary key is present, it returns "DISTRIBUTED BY (attr_primary_key)" >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File "C:\Projects\pgadmin4\web\pgadmin\browser\server_groups\ >> servers\databases\schemas\tables\tests\test_template_create.py", line >> 99, in runTest >> self.template_path, **self.input_parameters) >> File "C:\Projects\venv_pgadmin4_py_3_4\lib\site-packages\flask\templating.py", >> line 133, in render_template >> return _render(ctx.app.jinja_env.get_or_select_template(template_ >> name_or_list), >> File "C:\Projects\venv_pgadmin4_py_3_4\lib\site-packages\jinja2\environment.py", >> line 830, in get_or_select_template >> return self.get_template(template_name_or_list, parent, globals) >> File "C:\Projects\venv_pgadmin4_py_3_4\lib\site-packages\jinja2\environment.py", >> line 791, in get_template >> return self._load_template(name, self.make_globals(globals)) >> File "C:\Projects\venv_pgadmin4_py_3_4\lib\site-packages\jinja2\environment.py", >> line 765, in _load_template >> template = self.loader.load(self, name, globals) >> File "C:\Projects\venv_pgadmin4_py_3_4\lib\site-packages\jinja2\loaders.py", >> line 113, in load >> source, filename, uptodate = self.get_source(environment, name) >> File "C:\Projects\venv_pgadmin4_py_3_4\lib\site-packages\flask\templating.py", >> line 57, in get_source >> return self._get_source_fast(environment, template) >> File "C:\Projects\venv_pgadmin4_py_3_4\lib\site-packages\flask\templating.py", >> line 85, in _get_source_fast >> raise TemplateNotFound(template) >> jinja2.exceptions.TemplateNotFound: table\sql\gpdb_5.0_plus\create.sql >> >> ====================================================================== >> ERROR: runTest (pgadmin.browser.server_groups.servers.databases. >> schemas.tables.tests.test_template_create.TestTemplateCreate) >> When rendering GreenPlum 5.3 template, when distribution is present, it >> returns "DISTRIBUTED BY (attr1, attr2, attr4)" >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File "C:\Projects\pgadmin4\web\pgadmin\browser\server_groups\ >> servers\databases\schemas\tables\tests\test_template_create.py", line >> 99, in runTest >> self.template_path, **self.input_parameters) >> File "C:\Projects\venv_pgadmin4_py_3_4\lib\site-packages\flask\templating.py", >> line 133, in render_template >> return _render(ctx.app.jinja_env.get_or_select_template(template_ >> name_or_list), >> File "C:\Projects\venv_pgadmin4_py_3_4\lib\site-packages\jinja2\environment.py", >> line 830, in get_or_select_template >> return self.get_template(template_name_or_list, parent, globals) >> File "C:\Projects\venv_pgadmin4_py_3_4\lib\site-packages\jinja2\environment.py", >> line 791, in get_template >> return self._load_template(name, self.make_globals(globals)) >> File "C:\Projects\venv_pgadmin4_py_3_4\lib\site-packages\jinja2\environment.py", >> line 765, in _load_template >> template = self.loader.load(self, name, globals) >> File "C:\Projects\venv_pgadmin4_py_3_4\lib\site-packages\jinja2\loaders.py", >> line 113, in load >> source, filename, uptodate = self.get_source(environment, name) >> File "C:\Projects\venv_pgadmin4_py_3_4\lib\site-packages\flask\templating.py", >> line 57, in get_source >> return self._get_source_fast(environment, template) >> File "C:\Projects\venv_pgadmin4_py_3_4\lib\site-packages\flask\templating.py", >> line 85, in _get_source_fast >> raise TemplateNotFound(template) >> jinja2.exceptions.TemplateNotFound: table\sql\gpdb_5.0_plus\create.sql >> >> ====================================================================== >> ERROR: runTest (pgadmin.browser.tests.test_change_password. >> ChangePasswordTestCase) >> TestCase for Changing Valid_Password >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File "C:\Projects\pgadmin4\web\pgadmin\browser\tests\test_change_password.py", >> line 91, in runTest >> user_id = json.loads(response.data.decode('utf-8'))['id'] >> KeyError: 'id' >> >> ====================================================================== >> FAIL: runTest (pgadmin.browser.server_groups.servers.databases. >> external_tables.tests.test_external_tables_view.TestExternalTablesView) >> #nodes When retrieving the nodes and the database does not have external >> tables, it return no child nodes and status 200 >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File "C:\Python34\Lib\unittest\mock.py", line 1142, in patched >> return func(*args, **keywargs) >> File "C:\Projects\pgadmin4\web\pgadmin\browser\server_groups\ >> servers\databases\external_tables\tests\test_external_tables_view.py", >> line 314, in runTest >> self.__test_nodes() >> File "C:\Python34\Lib\unittest\mock.py", line 1142, in patched >> return func(*args, **keywargs) >> File "C:\Projects\pgadmin4\web\pgadmin\browser\server_groups\ >> servers\databases\external_tables\tests\test_external_tables_view.py", >> line 367, in __test_nodes >> self.expect_render_template_called_with >> File "C:\Python34\Lib\unittest\mock.py", line 777, in >> assert_called_with >> raise AssertionError(_error_message()) from cause >> AssertionError: Expected call: render_template('sql/#gpdb# >> 80323#/list.sql') >> Actual call: render_template('sql/#gpdb#80323#\\list.sql') >> >> ====================================================================== >> FAIL: runTest (pgadmin.browser.server_groups.servers.databases. >> external_tables.tests.test_external_tables_view.TestExternalTablesView) >> #nodes When retrieving the nodes and an error happens while executing the >> query, it return an internal server error and status 500 >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File "C:\Python34\Lib\unittest\mock.py", line 1142, in patched >> return func(*args, **keywargs) >> File "C:\Projects\pgadmin4\web\pgadmin\browser\server_groups\ >> servers\databases\external_tables\tests\test_external_tables_view.py", >> line 314, in runTest >> self.__test_nodes() >> File "C:\Python34\Lib\unittest\mock.py", line 1142, in patched >> return func(*args, **keywargs) >> File "C:\Projects\pgadmin4\web\pgadmin\browser\server_groups\ >> servers\databases\external_tables\tests\test_external_tables_view.py", >> line 367, in __test_nodes >> self.expect_render_template_called_with >> File "C:\Python34\Lib\unittest\mock.py", line 777, in >> assert_called_with >> raise AssertionError(_error_message()) from cause >> AssertionError: Expected call: render_template('sql/#gpdb# >> 80323#/list.sql') >> Actual call: render_template('sql/#gpdb#80323#\\list.sql') >> >> ====================================================================== >> FAIL: runTest (pgadmin.browser.server_groups.servers.databases. >> external_tables.tests.test_external_tables_view.TestExternalTablesView) >> #nodes When retrieving the nodes and the database has 2 external tables, >> it return 2 child nodes and status 200 >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File "C:\Python34\Lib\unittest\mock.py", line 1142, in patched >> return func(*args, **keywargs) >> File "C:\Projects\pgadmin4\web\pgadmin\browser\server_groups\ >> servers\databases\external_tables\tests\test_external_tables_view.py", >> line 314, in runTest >> self.__test_nodes() >> File "C:\Python34\Lib\unittest\mock.py", line 1142, in patched >> return func(*args, **keywargs) >> File "C:\Projects\pgadmin4\web\pgadmin\browser\server_groups\ >> servers\databases\external_tables\tests\test_external_tables_view.py", >> line 367, in __test_nodes >> self.expect_render_template_called_with >> File "C:\Python34\Lib\unittest\mock.py", line 777, in >> assert_called_with >> raise AssertionError(_error_message()) from cause >> AssertionError: Expected call: render_template('sql/#gpdb# >> 80323#/list.sql') >> Actual call: render_template('sql/#gpdb#80323#\\list.sql') >> >> ====================================================================== >> FAIL: runTest (pgadmin.browser.server_groups.servers.databases. >> external_tables.tests.test_external_tables_view.TestExternalTablesView) >> #node When retrieving the information about 1 external table and an error >> happens while executing the query, it return an internal server error and >> status 500 >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File "C:\Python34\Lib\unittest\mock.py", line 1142, in patched >> return func(*args, **keywargs) >> File "C:\Projects\pgadmin4\web\pgadmin\browser\server_groups\ >> servers\databases\external_tables\tests\test_external_tables_view.py", >> line 316, in runTest >> self.__test_node() >> File "C:\Python34\Lib\unittest\mock.py", line 1142, in patched >> return func(*args, **keywargs) >> File "C:\Projects\pgadmin4\web\pgadmin\browser\server_groups\ >> servers\databases\external_tables\tests\test_external_tables_view.py", >> line 393, in __test_node >> **self.expect_render_template_called_with >> File "C:\Python34\Lib\unittest\mock.py", line 777, in >> assert_called_with >> raise AssertionError(_error_message()) from cause >> AssertionError: Expected call: render_template(external_table_id=11, >> template_name_or_list='sql/#gpdb#80323#/node.sql') >> Actual call: render_template(external_table_id=11, >> template_name_or_list='sql/#gpdb#80323#\\node.sql') >> >> ====================================================================== >> FAIL: runTest (pgadmin.browser.server_groups.servers.databases. >> external_tables.tests.test_external_tables_view.TestExternalTablesView) >> #node When retrieving the information about 1 external table and table >> does not exist, it return an error message and status 404 >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File "C:\Python34\Lib\unittest\mock.py", line 1142, in patched >> return func(*args, **keywargs) >> File "C:\Projects\pgadmin4\web\pgadmin\browser\server_groups\ >> servers\databases\external_tables\tests\test_external_tables_view.py", >> line 316, in runTest >> self.__test_node() >> File "C:\Python34\Lib\unittest\mock.py", line 1142, in patched >> return func(*args, **keywargs) >> File "C:\Projects\pgadmin4\web\pgadmin\browser\server_groups\ >> servers\databases\external_tables\tests\test_external_tables_view.py", >> line 393, in __test_node >> **self.expect_render_template_called_with >> File "C:\Python34\Lib\unittest\mock.py", line 777, in >> assert_called_with >> raise AssertionError(_error_message()) from cause >> AssertionError: Expected call: render_template(external_table_id=11, >> template_name_or_list='sql/#gpdb#80323#/node.sql') >> Actual call: render_template(external_table_id=11, >> template_name_or_list='sql/#gpdb#80323#\\node.sql') >> >> ====================================================================== >> FAIL: runTest (pgadmin.browser.server_groups.servers.databases. >> external_tables.tests.test_external_tables_view.TestExternalTablesView) >> #nodes When retrieving the information about 1 external table and the >> table exists, it return external node information and status 200 >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File "C:\Python34\Lib\unittest\mock.py", line 1142, in patched >> return func(*args, **keywargs) >> File "C:\Projects\pgadmin4\web\pgadmin\browser\server_groups\ >> servers\databases\external_tables\tests\test_external_tables_view.py", >> line 316, in runTest >> self.__test_node() >> File "C:\Python34\Lib\unittest\mock.py", line 1142, in patched >> return func(*args, **keywargs) >> File "C:\Projects\pgadmin4\web\pgadmin\browser\server_groups\ >> servers\databases\external_tables\tests\test_external_tables_view.py", >> line 393, in __test_node >> **self.expect_render_template_called_with >> File "C:\Python34\Lib\unittest\mock.py", line 777, in >> assert_called_with >> raise AssertionError(_error_message()) from cause >> AssertionError: Expected call: render_template(external_table_id=11, >> template_name_or_list='sql/#gpdb#80323#/node.sql') >> Actual call: render_template(external_table_id=11, >> template_name_or_list='sql/#gpdb#80323#\\node.sql') >> >> ====================================================================== >> FAIL: runTest (pgadmin.browser.server_groups.servers.databases. >> external_tables.tests.test_external_tables_view.TestExternalTablesView) >> #properties When retrieving the properties of a external table and the >> table exists, it return the properties and status 200 >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File "C:\Python34\Lib\unittest\mock.py", line 1142, in patched >> return func(*args, **keywargs) >> File "C:\Projects\pgadmin4\web\pgadmin\browser\server_groups\ >> servers\databases\external_tables\tests\test_external_tables_view.py", >> line 320, in runTest >> self.__test_properties() >> File "C:\Python34\Lib\unittest\mock.py", line 1142, in patched >> return func(*args, **keywargs) >> File "C:\Projects\pgadmin4\web\pgadmin\browser\server_groups\ >> servers\databases\external_tables\tests\test_external_tables_view.py", >> line 419, in __test_properties >> **self.expect_render_template_called_with >> File "C:\Python34\Lib\unittest\mock.py", line 777, in >> assert_called_with >> raise AssertionError(_error_message()) from cause >> AssertionError: Expected call: render_template(template_name_ >> or_list='sql/#gpdb#80323#/get_table_information.sql', table_oid=11) >> Actual call: render_template(template_name_or_list='sql/#gpdb#80323#\\get_table_information.sql', >> table_oid=11) >> >> ---------------------------------------------------------------------- >> Ran 256 tests in 77.123s >> >> FAILED (failures=7, errors=4, skipped=25) >> >> ====================================================================== >> Test Result Summary >> ====================================================================== >> >> PostgreSQL 9.6: >> >> 234 tests passed >> 3 tests failed: >> TestExternalTablesView (#node When retrieving the >> information about 1 external table and table does not exist, it return an >> error message and status 404, >> #node When retrieving the >> information about 1 external table and an error happens while executing the >> query, it return an internal server error and status 500, >> #nodes When retrieving the nodes >> and the database has 2 external tables, it return 2 child nodes and status >> 200, >> #nodes When retrieving the >> information about 1 external table and the table exists, it return external >> node information and status 200, >> #nodes When retrieving the nodes >> and an error happens while executing the query, it return an internal >> server error and status 500, >> #properties When retrieving the >> properties of a external table and the table exists, it return the >> properties and status 200, >> #nodes When retrieving the nodes >> and the database does not have external tables, it return no child nodes >> and status 200) >> ChangePasswordTestCase (TestCase for Changing >> Valid_Password) >> TestTemplateCreate (When rendering GreenPlum 5.3 >> template, when no distribution is present, when no primary key is present, >> it returns "DISTRIBUTED RANDOMLY", >> When rendering GreenPlum 5.3 >> template, when distribution is present, it returns "DISTRIBUTED BY (attr1, >> attr2, attr4)", >> When rendering GreenPlum 5.3 >> template, when no distribution is present, when primary key is present, it >> returns "DISTRIBUTED BY (attr_primary_key)") >> 19 tests skipped: >> ResourceGroupsGetTestCase (Get resource groups) >> TableSpaceDeleteTestCase (Check Tablespace Node) >> ResourceGroupsDeleteTestCase (Delete resource groups) >> SynonymDeleteTestCase (Fetch synonym Node URL) >> TestSSLConnection (Test for SSL connection) >> PackageAddTestCase (Fetch Package Node URL) >> SynonymPutTestCase (Fetch synonym Node URL) >> TablespaceGetTestCase (Check Tablespace Node) >> SynonymAddTestCase (Default Node URL) >> PackagePutTestCase (Fetch Package Node URL) >> TableAddTestCase (Create Range partitioned table with 2 >> partitions, >> Create List partitioned table >> with 2 partitions) >> PackageGetTestCase (Fetch Package Node URL) >> PackageDeleteTestCase (Fetch Package Node URL) >> TableSpaceAddTestCase (Check Tablespace Node) >> ResourceGroupsAddTestCase (Add resource groups) >> SynonymGetTestCase (Fetch synonym Node URL) >> ResourceGroupsPutTestCase (Put resource groups) >> TableSpaceUpdateTestCase (Check Tablespace Node) >> TableUpdateTestCase (Attach partition to existing range >> partitioned table, >> Detach partition from existing >> range partitioned table, >> Create partitions of existing >> range partitioned table, >> Detach partition from existing >> list partitioned table, >> Create partitions of existing >> list partitioned table, >> Attach partition to existing list >> partitioned table) >> >> ====================================================================== >> >> ######## >> >> >> Thanks, >> Neel Patel >> >> On Fri, Mar 2, 2018 at 10:19 PM, Dave Page wrote: >> >>> Support for external tables in GPDB. Fixes #3168 >>> >>> Branch >>> ------ >>> master >>> >>> Details >>> ------- >>> https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h= >>> 427314cfdfeb96c3a7835eab5a4d638903bc6dc3 >>> Author: Joao Pedro De Almeida Pereira >>> >>> Modified Files >>> -------------- >>> .../servers/databases/external_tables/__init__.py | 275 +++++++++++++ >>> .../databases/external_tables/actions/__init__.py | 0 >>> .../external_tables/actions/get_all_nodes.py | 4 + >>> .../databases/external_tables/mapping_utils.py | 165 ++++++++ >>> .../databases/external_tables/properties.py | 78 ++++ >>> .../external_tables/reverse_engineer_ddl.py | 69 ++++ >>> .../static/img/coll-external_table.svg | 1 + >>> .../external_tables/static/img/external_table.svg | 1 + >>> .../templates/sql/gpdb_5.0_plus/create.sql | 60 +++ >>> .../templates/sql/gpdb_5.0_plus/get_columns.sql | 12 + >>> .../sql/gpdb_5.0_plus/get_table_information.sql | 22 ++ >>> .../templates/sql/gpdb_5.0_plus/list.sql | 6 + >>> .../templates/sql/gpdb_5.0_plus/node.sql | 5 + >>> .../databases/external_tables/tests/__init__.py | 0 >>> .../tests/test_external_tables_module.py | 99 +++++ >>> .../tests/test_external_tables_view.py | 428 >>> +++++++++++++++++++++ >>> .../external_tables/tests/test_mapping_utils.py | 375 >>> ++++++++++++++++++ >>> .../external_tables/tests/test_properties.py | 156 ++++++++ >>> .../tests/test_reverse_engineer_ddl.py | 261 +++++++++++++ >>> .../tests/test_sql_template_create_integration.py | 0 >>> .../templates/table/sql/gpdb_5.0_plus/nodes.sql | 1 + >>> web/pgadmin/static/bundle/browser.js | 1 + >>> .../databases/external_tables/external_tables.js | 88 +++++ >>> .../servers/databases/external_tables/index.js | 18 + >>> web/pgadmin/tools/sqleditor/__init__.py | 1 + >>> .../external_tables/external_tables_spec.js | 56 +++ >>> web/webpack.config.js | 9 + >>> web/webpack.shim.js | 3 + >>> 28 files changed, 2194 insertions(+) >>> >>> >> --089e082c7f84a07abe056737dfd6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Dave,

Joao&#= 39;s patch is pending, would you please do the needful?
I also encounter similar issue on Windows while runn= ing tests.

<= div dir=3D"ltr">
--
Regards,
Murtuza Zabuaw= ala
EnterpriseDB:=C2=A0http://www.enterprisedb.com
The Enterpr= ise PostgreSQL Company


On Tue, Mar 6, 2018 at 8:25 PM, Joao De Alme= ida Pereira <jdealmeidapereira@pivotal.io> wrote:=
Hello Neel,

You can find attached the corrections of the path's needed for = windows. The fix should correct=C2=A0TestExternalTablesView and=C2=A0TestTemplateCreate but for the ChangePasswo= rdTestCase I need more information to help you out. We need to understand w= hat is the response that the endpoint /user_management/user is returning.

Thanks
Joao

On Tue, Mar 6, 2018 at 2:29 AM Neel Patel &l= t;neel.pat= el@enterprisedb.com> wrote:
=
Hi=C2=A0Joao,

I ran= the testsuite in windows 10 with Python 3.4 and it fails for external tabl= es. Linux it is working fine. Let me know if I m= iss anything.

Please check the below logs.<= /div>

python runtests.py --pkg browser --exclude feature= _tests

########

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D
ERROR: runTest (pgadmin.browser.serve= r_groups.servers.databases.schemas.tables.tests.test_templat= e_create.TestTemplateCreate)
When rendering GreenPlum 5.3 te= mplate, when no distribution is present, when no primary key is present, it= returns "DISTRIBUTED RANDOMLY"
-----------------------= -----------------------------------------------
Traceba= ck (most recent call last):
=C2=A0 File "C:\Projects\pgadmin= 4\web\pgadmin\browser\server_groups\servers\databases\schemas\tables\tests\test_template_create.py", line 99, in runTest
=C2=A0 =C2=A0 self.template_path, **self.input_parameters)
= =C2=A0 File "C:\Projects\venv_pgadmin4_py_3_4\lib\site-packages\f= lask\templating.py", line 133, in render_template
=C2= =A0 =C2=A0 return _render(ctx.app.jinja_env.get_or_select_template(tem= plate_name_or_list),
=C2=A0 File "C:\Projects\venv_pgad= min4_py_3_4\lib\site-packages\jinja2\environment.py", line 8= 30, in get_or_select_template
=C2=A0 =C2=A0 return self.get_templ= ate(template_name_or_list, parent, globals)
=C2=A0 File &quo= t;C:\Projects\venv_pgadmin4_py_3_4\lib\site-packages\jinja2\envir= onment.py", line 791, in get_template
=C2=A0 =C2=A0 return s= elf._load_template(name, self.make_globals(globals))
=C2=A0 File = "C:\Projects\venv_pgadmin4_py_3_4\lib\site-packages\jinja2\e= nvironment.py", line 765, in _load_template
=C2=A0 =C2=A0 te= mplate =3D self.loader.load(self, name, globals)
=C2=A0 File &quo= t;C:\Projects\venv_pgadmin4_py_3_4\lib\site-packages\jinja2\loade= rs.py", line 113, in load
=C2=A0 =C2=A0 source, filename, up= todate =3D self.get_source(environment, name)
=C2=A0 File "C= :\Projects\venv_pgadmin4_py_3_4\lib\site-packages\flask\templatin= g.py", line 57, in get_source
=C2=A0 =C2=A0 return self._get= _source_fast(environment, template)
=C2=A0 File "C:\Pro= jects\venv_pgadmin4_py_3_4\lib\site-packages\flask\templating.py&= quot;, line 85, in _get_source_fast
=C2=A0 =C2=A0 raise TemplateN= otFound(template)
jinja2.exceptions.TemplateNotFound: table\= sql\gpdb_5.0_plus\create.sql

=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
ERROR: r= unTest (pgadmin.browser.server_groups.servers.databases.schemas.t= ables.tests.test_template_create.TestTemplateCreate)
Wh= en rendering GreenPlum 5.3 template, when no distribution is present, when = primary key is present, it returns "DISTRIBUTED BY (attr_primary_key)&= quot;
------------------------------------------------------= ----------------
Traceback (most recent call last):
=C2=A0 File "C:\Projects\pgadmin4\web\pgadmin\browser\server_gr= oups\servers\databases\schemas\tables\tests\test_template_cr= eate.py", line 99, in runTest
=C2=A0 =C2=A0 self.template_pa= th, **self.input_parameters)
=C2=A0 File "C:\Projects\venv_p= gadmin4_py_3_4\lib\site-packages\flask\templating.py", line = 133, in render_template
=C2=A0 =C2=A0 return _render(ctx.app.jinj= a_env.get_or_select_template(template_name_or_list),
= =C2=A0 File "C:\Projects\venv_pgadmin4_py_3_4\lib\site-packages\j= inja2\environment.py", line 830, in get_or_select_template
<= div>=C2=A0 =C2=A0 return self.get_template(template_name_or_list, pare= nt, globals)
=C2=A0 File "C:\Projects\venv_pgadmin4_py_= 3_4\lib\site-packages\jinja2\environment.py", line 791, in get_te= mplate
=C2=A0 =C2=A0 return self._load_template(name, self.make_g= lobals(globals))
=C2=A0 File "C:\Projects\venv_pgadmin4_py_<= wbr>3_4\lib\site-packages\jinja2\environment.py", line 765, in _l= oad_template
=C2=A0 =C2=A0 template =3D self.loader.load(self, na= me, globals)
=C2=A0 File "C:\Projects\venv_pgadmin4_py_= 3_4\lib\site-packages\jinja2\loaders.py", line 113, in load
=
=C2=A0 =C2=A0 source, filename, uptodate =3D self.get_source(environme= nt, name)
=C2=A0 File "C:\Projects\venv_pgadmin4_py_3_4= \lib\site-packages\flask\templating.py", line 57, in get_source
=C2=A0 =C2=A0 return self._get_source_fast(environment, templ= ate)
=C2=A0 File "C:\Projects\venv_pgadmin4_py_3_4\lib\= site-packages\flask\templating.py", line 85, in _get_source_fast<= /div>
=C2=A0 =C2=A0 raise TemplateNotFound(template)
jinja2.e= xceptions.TemplateNotFound: table\sql\gpdb_5.0_plus\create.sql

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D
ERROR: runTest (pgadmin.browser.server_groups.servers.databases.schemas.tables.tests.test_template_crea= te.TestTemplateCreate)
When rendering GreenPlum 5.3 template= , when distribution is present, it returns "DISTRIBUTED BY (attr1, att= r2, attr4)"
-------------------------------------------= ---------------------------
Traceback (most recent call last= ):
=C2=A0 File "C:\Projects\pgadmin4\web\pgadmin\browse= r\server_groups\servers\databases\schemas\tables\tests\test_templ= ate_create.py", line 99, in runTest
=C2=A0 =C2=A0 self.= template_path, **self.input_parameters)
=C2=A0 File "C:\Proj= ects\venv_pgadmin4_py_3_4\lib\site-packages\flask\templating.py&q= uot;, line 133, in render_template
=C2=A0 =C2=A0 return _render(c= tx.app.jinja_env.get_or_select_template(template_name_or_list),
=C2=A0 File "C:\Projects\venv_pgadmin4_py_3_4\lib\site-p= ackages\jinja2\environment.py", line 830, in get_or_select_templa= te
=C2=A0 =C2=A0 return self.get_template(template_name_or_l= ist, parent, globals)
=C2=A0 File "C:\Projects\venv_pgadmin4= _py_3_4\lib\site-packages\jinja2\environment.py", line 791, = in get_template
=C2=A0 =C2=A0 return self._load_template(name, se= lf.make_globals(globals))
=C2=A0 File "C:\Projects\venv_pgad= min4_py_3_4\lib\site-packages\jinja2\environment.py", line 7= 65, in _load_template
=C2=A0 =C2=A0 template =3D self.loader.load= (self, name, globals)
=C2=A0 File "C:\Projects\venv_pgadmin4= _py_3_4\lib\site-packages\jinja2\loaders.py", line 113, in l= oad
=C2=A0 =C2=A0 source, filename, uptodate =3D self.get_source(= environment, name)
=C2=A0 File "C:\Projects\venv_pgadmin4_py= _3_4\lib\site-packages\flask\templating.py", line 57, in get= _source
=C2=A0 =C2=A0 return self._get_source_fast(environme= nt, template)
=C2=A0 File "C:\Projects\venv_pgadmin4_py_3_4\lib\site-packages\flask\templating.py", line 85, in _get_sou= rce_fast
=C2=A0 =C2=A0 raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: table\sql\gpdb_5.0_plus\crea= te.sql

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
ERROR: runTest (pgadmin.browser.te= sts.test_change_password.ChangePasswordTestCase)
TestCa= se for Changing Valid_Password
----------------------------------------------------------------------
Traceback (most re= cent call last):
=C2=A0 File "C:\Projects\pgadmin4\web\= pgadmin\browser\tests\test_change_password.py", line 91, in runTe= st
=C2=A0 =C2=A0 user_id =3D json.loads(response.data.decode= ('utf-8'))['id']
KeyError: 'id'

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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.server_groups= .servers.databases.external_tables.tests.test_external_tables_vie= w.TestExternalTablesView)
#nodes When retrieving the nodes a= nd the database does not have external tables, it return no child nodes and= status 200
------------------------------------------------= ----------------------
Traceback (most recent call last):
=C2=A0 File "C:\Python34\Lib\unittest\mock.py", line= 1142, in patched
=C2=A0 =C2=A0 return func(*args, **keywargs)
=C2=A0 File "C:\Projects\pgadmin4\web\pgadmin\browser\ser= ver_groups\servers\databases\external_tables\tests\test_external_= tables_view.py", line 314, in runTest
=C2=A0 =C2=A0 sel= f.__test_nodes()
=C2=A0 File "C:\Python34\Lib\unittest\= mock.py", line 1142, in patched
=C2=A0 =C2=A0 return func(*a= rgs, **keywargs)
=C2=A0 File "C:\Projects\pgadmin4\web\= pgadmin\browser\server_groups\servers\databases\external_tables\t= ests\test_external_tables_view.py", line 367, in __test_nodes
=C2=A0 =C2=A0 self.expect_render_template_called_with
=C2=A0 File "C:\Python34\Lib\unittest\mock.py", line 777, i= n assert_called_with
=C2=A0 =C2=A0 raise AssertionError(_error_me= ssage()) from cause
AssertionError: Expected call: render_te= mplate('sql/#gpdb#80323#/list.sql')
Actual call: ren= der_template('sql/#gpdb#80323#\\list.sql')

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =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.server_groups.servers.dat= abases.external_tables.tests.test_external_tables_view.TestE= xternalTablesView)
#nodes When retrieving the nodes and an error = happens while executing the query, it return an internal server error and s= tatus 500
--------------------------------------------------= --------------------
Traceback (most recent call last):
=C2=A0 File "C:\Python34\Lib\unittest\mock.py", line 1= 142, in patched
=C2=A0 =C2=A0 return func(*args, **keywargs)
=C2=A0 File "C:\Projects\pgadmin4\web\pgadmin\browser\serve= r_groups\servers\databases\external_tables\tests\test_external_tables_view.py", line 314, in runTest
=C2=A0 =C2=A0 self.= __test_nodes()
=C2=A0 File "C:\Python34\Lib\unittest\mo= ck.py", line 1142, in patched
=C2=A0 =C2=A0 return func(*arg= s, **keywargs)
=C2=A0 File "C:\Projects\pgadmin4\web\pg= admin\browser\server_groups\servers\databases\external_tables\tes= ts\test_external_tables_view.py", line 367, in __test_nodes
=
=C2=A0 =C2=A0 self.expect_render_template_called_with
= =C2=A0 File "C:\Python34\Lib\unittest\mock.py", line 777, in= assert_called_with
=C2=A0 =C2=A0 raise AssertionError(_error_mes= sage()) from cause
AssertionError: Expected call: render_tem= plate('sql/#gpdb#80323#/list.sql')
Actual call: rend= er_template('sql/#gpdb#80323#\\list.sql')

=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =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.server_groups.servers.dat= abases.external_tables.tests.test_external_tables_view.TestE= xternalTablesView)
#nodes When retrieving the nodes and the datab= ase has 2 external tables, it return 2 child nodes and status 200
----------------------------------------------------------------= ------
Traceback (most recent call last):
=C2=A0 File &= quot;C:\Python34\Lib\unittest\mock.py", line 1142, in patched
=C2=A0 =C2=A0 return func(*args, **keywargs)
=C2=A0 File &= quot;C:\Projects\pgadmin4\web\pgadmin\browser\server_groups\serve= rs\databases\external_tables\tests\test_external_tables_view.py&q= uot;, line 314, in runTest
=C2=A0 =C2=A0 self.__test_nodes()
=C2=A0 File "C:\Python34\Lib\unittest\mock.py", line 1= 142, in patched
=C2=A0 =C2=A0 return func(*args, **keywargs)
=C2=A0 File "C:\Projects\pgadmin4\web\pgadmin\browser\serve= r_groups\servers\databases\external_tables\tests\test_external_tables_view.py", line 367, in __test_nodes
=C2=A0 =C2=A0 = self.expect_render_template_called_with
=C2=A0 File "C:= \Python34\Lib\unittest\mock.py", line 777, in assert_called_with<= /div>
=C2=A0 =C2=A0 raise AssertionError(_error_message()) from ca= use
AssertionError: Expected call: render_template('sql/#gpdb= #80323#/list.sql')
Actual call: render_template('sql= /#gpdb#80323#\\list.sql')

=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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: ru= nTest (pgadmin.browser.server_groups.servers.databases.external_t= ables.tests.test_external_tables_view.TestExternalTablesView)
#node When retrieving the information about 1 external table and an = error happens while executing the query, it return an internal server error= and status 500
--------------------------------------------= --------------------------
Traceback (most recent call last)= :
=C2=A0 File "C:\Python34\Lib\unittest\mock.py", = line 1142, in patched
=C2=A0 =C2=A0 return func(*args, **keywargs= )
=C2=A0 File "C:\Projects\pgadmin4\web\pgadmin\browser= \server_groups\servers\databases\external_tables\tests\test_exter= nal_tables_view.py", line 316, in runTest
=C2=A0 =C2=A0= self.__test_node()
=C2=A0 File "C:\Python34\Lib\unittest\mock.py", line 1142, in patched
=C2=A0 =C2=A0 return func= (*args, **keywargs)
=C2=A0 File "C:\Projects\pgadmin4\web\pgadmin\browser\server_groups\servers\databases\external_table= s\tests\test_external_tables_view.py", line 393, in __test_node
=C2=A0 =C2=A0 **self.expect_render_template_called_with
=
=C2=A0 File "C:\Python34\Lib\unittest\mock.py", line 77= 7, in assert_called_with
=C2=A0 =C2=A0 raise AssertionError(_erro= r_message()) from cause
AssertionError: Expected call: rende= r_template(external_table_id=3D11, template_name_or_list=3D'sql/#<= wbr>gpdb#80323#/node.sql')
Actual call: render_template(exter= nal_table_id=3D11, template_name_or_list=3D'sql/#gpdb#80323#\= \node.sql')

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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.bro= wser.server_groups.servers.databases.external_tables.tests.test_<= wbr>external_tables_view.TestExternalTablesView)
#node When = retrieving the information about 1 external table and table does not exist,= it return an error message and status 404
----------------------= ------------------------------------------------
Traceb= ack (most recent call last):
=C2=A0 File "C:\Python34\Lib\un= ittest\mock.py", line 1142, in patched
=C2=A0 =C2=A0 re= turn func(*args, **keywargs)
=C2=A0 File "C:\Projects\pgadmi= n4\web\pgadmin\browser\server_groups\servers\databases\external_<= wbr>tables\tests\test_external_tables_view.py", line 316, in runT= est
=C2=A0 =C2=A0 self.__test_node()
=C2=A0 File "= C:\Python34\Lib\unittest\mock.py", line 1142, in patched
=C2=A0 =C2=A0 return func(*args, **keywargs)
=C2=A0 File "= C:\Projects\pgadmin4\web\pgadmin\browser\server_groups\servers\da= tabases\external_tables\tests\test_external_tables_view.py",= line 393, in __test_node
=C2=A0 =C2=A0 **self.expect_render_temp= late_called_with
=C2=A0 File "C:\Python34\Lib\unittest\= mock.py", line 777, in assert_called_with
=C2=A0 =C2=A0= raise AssertionError(_error_message()) from cause
Assertion= Error: Expected call: render_template(external_table_id=3D11, template= _name_or_list=3D'sql/#gpdb#80323#/node.sql')
Actual = call: render_template(external_table_id=3D11, template_name_or_list=3D= 'sql/#gpdb#80323#\\node.sql')

=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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.server_groups.servers.databases.e= xternal_tables.tests.test_external_tables_view.TestExternalTables= View)
#nodes When retrieving the information about 1 external tab= le and the table exists, it return external node information and status 200=
-----------------------------------------------------------= -----------
Traceback (most recent call last):
=C2= =A0 File "C:\Python34\Lib\unittest\mock.py", line 1142, in p= atched
=C2=A0 =C2=A0 return func(*args, **keywargs)
=C2= =A0 File "C:\Projects\pgadmin4\web\pgadmin\browser\server_groups\= servers\databases\external_tables\tests\test_external_tables= _view.py", line 316, in runTest
=C2=A0 =C2=A0 self.__test_no= de()
=C2=A0 File "C:\Python34\Lib\unittest\mock.py"= ;, line 1142, in patched
=C2=A0 =C2=A0 return func(*args, **keywa= rgs)
=C2=A0 File "C:\Projects\pgadmin4\web\pgadmin\brow= ser\server_groups\servers\databases\external_tables\tests\test_ex= ternal_tables_view.py", line 393, in __test_node
=C2=A0= =C2=A0 **self.expect_render_template_called_with
=C2=A0 Fil= e "C:\Python34\Lib\unittest\mock.py", line 777, in assert_ca= lled_with
=C2=A0 =C2=A0 raise AssertionError(_error_message(= )) from cause
AssertionError: Expected call: render_template(exte= rnal_table_id=3D11, template_name_or_list=3D'sql/#gpdb#80323#= /node.sql')
Actual call: render_template(external_table_= id=3D11, template_name_or_list=3D'sql/#gpdb#80323#\\node.sql')=

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=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.server_groups.servers.databases.external_tables.tests.test_external_t= ables_view.TestExternalTablesView)
#properties When retrievi= ng the properties of a external table and the table exists, it return the p= roperties and status 200
-----------------------------------= -----------------------------------
Traceback (most recent c= all last):
=C2=A0 File "C:\Python34\Lib\unittest\mock.p= y", line 1142, in patched
=C2=A0 =C2=A0 return func(*args, *= *keywargs)
=C2=A0 File "C:\Projects\pgadmin4\web\pgadmi= n\browser\server_groups\servers\databases\external_tables\tests\t= est_external_tables_view.py", line 320, in runTest
=C2= =A0 =C2=A0 self.__test_properties()
=C2=A0 File "C:\Python34= \Lib\unittest\mock.py", line 1142, in patched
=C2=A0 = =C2=A0 return func(*args, **keywargs)
=C2=A0 File "C:\Projec= ts\pgadmin4\web\pgadmin\browser\server_groups\servers\databases\e= xternal_tables\tests\test_external_tables_view.py", line 419= , in __test_properties
=C2=A0 =C2=A0 **self.expect_render_templat= e_called_with
=C2=A0 File "C:\Python34\Lib\unittest\mock.py", line 777, in assert_called_with
=C2=A0 =C2=A0 ra= ise AssertionError(_error_message()) from cause
AssertionErr= or: Expected call: render_template(template_name_or_list=3D'sql/#g= pdb#80323#/get_table_information.sql', table_oid=3D11)
A= ctual call: render_template(template_name_or_list=3D'sql/#gpdb#803= 23#\\get_table_information.sql', table_oid=3D11)

----------------------------------------------------------------------
Ran 256 tests in 77.123s

F= AILED (failures=3D7, errors=3D4, skipped=3D25)

=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
<= div>Test Result Summary
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

PostgreSQL 9.6:

=C2=A0 =C2=A0 =C2=A0 =C2=A0 234 tests passed
<= div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 3 tests failed:
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 TestExternalTablesView (#node When r= etrieving the information about 1 external table and table does not exist, = it return an error message and status 404,
=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 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 #node When retrieving the inf= ormation about 1 external table and an error happens while executing the qu= ery, it return an internal server error and status 500,
=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 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 #nodes When ret= rieving the nodes and the database has 2 external tables, it return 2 child= nodes and status 200,
=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 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 #nodes When retrieving the information about 1 ext= ernal table and the table exists, it return external node information and s= tatus 200,
=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 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 #nodes When retrieving the nodes and an error happens while e= xecuting the query, it return an internal server error and status 500,
=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 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 #pro= perties When retrieving the properties of a external table and the table ex= ists, it return the properties and status 200,
=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 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 #nodes When retrieving the= nodes and the database does not have external tables, it return no child n= odes and status 200)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 ChangePasswordTestCase (TestCase for Changing Valid_Password)=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 TestTemp= lateCreate (When rendering GreenPlum 5.3 template, when no distribution is = present, when no primary key is present, it returns "DISTRIBUTED RANDO= MLY",
=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 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 When rendering GreenPlum 5.3 template, when distribution is p= resent, it returns "DISTRIBUTED BY (attr1, attr2, attr4)",
<= div>=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 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 When = rendering GreenPlum 5.3 template, when no distribution is present, when pri= mary key is present, it returns "DISTRIBUTED BY (attr_primary_key)&quo= t;)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 19 tests skipped:
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ResourceGroupsGetTestC= ase (Get resource groups)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 TableSpaceDeleteTestCase (Check Tablespace Node)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ResourceGroupsDel= eteTestCase (Delete resource groups)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 SynonymDeleteTestCase (Fetch synonym Node URL)<= /div>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 TestSSLCo= nnection (Test for SSL connection)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 PackageAddTestCase (Fetch Package Node URL)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 SynonymPutTe= stCase (Fetch synonym Node URL)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 TablespaceGetTestCase (Check Tablespace Node)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 SynonymAddTes= tCase (Default Node URL)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 PackagePutTestCase (Fetch Package Node URL)
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 TableAddTestCase (Crea= te Range partitioned table with 2 partitions,
=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 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Create List partitioned ta= ble with 2 partitions)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 PackageGetTestCase (Fetch Package Node URL)
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 PackageDeleteTestCase (Fet= ch Package Node URL)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 TableSpaceAddTestCase (Check Tablespace Node)
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ResourceGroupsAddTestC= ase (Add resource groups)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 SynonymGetTestCase (Fetch synonym Node URL)
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ResourceGroupsPutTestC= ase (Put resource groups)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 TableSpaceUpdateTestCase (Check Tablespace Node)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 TableUpdateTestCa= se (Attach partition to existing range partitioned table,
=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 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Detach partitio= n from existing range partitioned table,
=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 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Create partitions of existing ran= ge partitioned table,
=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 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 Detach partition from existing list partitioned ta= ble,
=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 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 Create partitions of existing list partitioned table,
=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 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Attach parti= tion to existing list partitioned table)

=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=

########


Thanks,
<= div>Neel Patel

On Fri, Mar 2, 2018 at 10:19 PM,= Dave Page <dpage@pgadmin.org> wrote:
Support for external tables in GPDB. Fixes #3168

Branch
------
master

Details
-------
https://git.postgresql.org/gitweb?p=3Dpgadmin4.git;a=3Dcommitdiff;h=3D427314cfdfeb96c3a7835eab5a4d638903bc6dc3
Author: Joao Pedro De Almeida Pereira <jdealmeidapereira@pivotal.io>

Modified Files
--------------
.../servers/databases/external_tables/__init__.py=C2=A0 | 275 ++++++++= +++++
.../databases/external_tables/actions/__init__.py=C2=A0 |=C2=A0 =C2=A0= 0
.../external_tables/actions/get_all_nodes.py=C2=A0 =C2=A0 =C2=A0 =C2= =A0|=C2=A0 =C2=A04 +
.../databases/external_tables/mapping_utils.py=C2=A0 =C2=A0 =C2=A0| 16= 5 ++++++++
.../databases/external_tables/properties.py=C2=A0 =C2=A0 =C2=A0 =C2=A0= |=C2=A0 78 ++++
.../external_tables/reverse_engineer_ddl.py=C2=A0 =C2=A0 =C2=A0 =C2=A0= |=C2=A0 69 ++++
.../static/img/coll-external_table.svg=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0|=C2=A0 =C2=A01 +
.../external_tables/static/img/external_table.svg=C2=A0 |=C2=A0 =C2=A0= 1 +
.../templates/sql/gpdb_5.0_plus/create.sql=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0|=C2=A0 60 +++
.../templates/sql/gpdb_5.0_plus/get_columns.sql=C2=A0 =C2=A0 |=C2=A0 1= 2 +
.../sql/gpdb_5.0_plus/get_table_information.sql=C2=A0 =C2=A0 |=C2=A0 2= 2 ++
.../templates/sql/gpdb_5.0_plus/list.sql=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0|=C2=A0 =C2=A06 +
.../templates/sql/gpdb_5.0_plus/node.sql=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0|=C2=A0 =C2=A05 +
.../databases/external_tables/tests/__init__.py=C2=A0 =C2=A0 |=C2=A0 = =C2=A00
.../tests/test_external_tables_module.py=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0|=C2=A0 99 +++++
.../tests/test_external_tables_view.py=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0| 428 +++++++++++++++++++++
.../external_tables/tests/test_mapping_utils.py=C2=A0 =C2=A0 | 375 +++= +++++++++++++++
.../external_tables/tests/test_properties.py=C2=A0 =C2=A0 =C2=A0 =C2= =A0| 156 ++++++++
.../tests/test_reverse_engineer_ddl.py=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0| 261 +++++++++++++
.../tests/test_sql_template_create_integration.py=C2=A0 |=C2=A0 =C2=A0= 0
.../templates/table/sql/gpdb_5.0_plus/nodes.sql=C2=A0 =C2=A0 |=C2=A0 = =C2=A01 +
web/pgadmin/static/bundle/browser.js=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0|=C2=A0 =C2=A01 +
.../databases/external_tables/external_tables.js=C2=A0 =C2=A0|=C2=A0 8= 8 +++++
.../servers/databases/external_tables/index.js=C2=A0 =C2=A0 =C2=A0|=C2= =A0 18 +
web/pgadmin/tools/sqleditor/__init__.py=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 |=C2=A0 =C2=A01 +
.../external_tables/external_tables_spec.js=C2=A0 =C2=A0 =C2=A0 =C2=A0= |=C2=A0 56 +++
web/webpack.config.js=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 |=C2=A0 =C2=A09 +
web/webpack.shim.js=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 =C2=A0 |=C2=A0 =C2=A03 + 28 files changed, 2194 insertions(+)



--089e082c7f84a07abe056737dfd6--