Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fQVcP-0004wr-RM for pgadmin-hackers@arkaria.postgresql.org; Wed, 06 Jun 2018 10:24:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fQVcO-0004nL-9p for pgadmin-hackers@arkaria.postgresql.org; Wed, 06 Jun 2018 10:24:40 +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 1fQVcN-0004nB-9j for pgadmin-hackers@lists.postgresql.org; Wed, 06 Jun 2018 10:24:40 +0000 Received: from mail-oi0-x243.google.com ([2607:f8b0:4003:c06::243]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fQVcD-0000W2-5x for pgadmin-hackers@postgresql.org; Wed, 06 Jun 2018 10:24:37 +0000 Received: by mail-oi0-x243.google.com with SMTP id f79-v6so4918003oib.7 for ; Wed, 06 Jun 2018 03:24:28 -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=MkcaZOMvIbQP0n8E8t2LZ0/KaL7MTaVhuNtbbcC6y5M=; b=sxEjZS7ZJfJ88EFlxBhqS7KpEeZ4pt/+JPFy0rss8gA/9s4OGyWWc1DOTI8jDs4Hoj NbVZD0gehunM6jZLcyOnOuN3qJ2yGhQF7XSpBQnDuVVDBodJLur4UjaTqvN3UIEdP5CN IBSbjIlQmCzQuVbSjqhHVyKv5jqtzbpwdaoECxdtnuQfMgDWNbO1kqEjVu6pZcKWhRJw b9R43yvnUfCGO0SkV6uvBDuhZ31CUx0vGBog2jWG+TnlOB9k5L0wf+Zx7/qgbVkRBA36 /0XmDJ7sJCBZW3KYAwbF6kTQBotKDKt3bguzS+pp55RglgHiB4OmLjY1xx0bIsY4zh7Q O6ew== 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=MkcaZOMvIbQP0n8E8t2LZ0/KaL7MTaVhuNtbbcC6y5M=; b=p3NeCO1BeSYVtxxCJHTd9wMkdIu53qPqLsrHI3hIdhM33zmagpASuOKwLv0DdPRrLl jgjTpomMEYVXJt+PGMY/2Ayin1zaLFm811Djm2spPo6MZk6ZQ1uQBjmvTo+pAq4csZNd Fs99EYe6AwZmd+TEvAWpJ3NiSa9HLfjNaKpYg9ByzUa4jAh0y7DPedVYQMoRgxhFgArW xHs0KDScODnT5eSBbvbchcxFcvBPHcRJopQx2mBZXqmeJDkK00TP/TCCLpblYTnOCBR9 uufZ2NWweohhMqcdOBGfVhHb2Gg1w0q8kduDd9bT4QUvumW6+L84ZbVn5Ge8azRnJOkK nV5g== X-Gm-Message-State: APt69E1GPJja5xn6PAJETiXwJ5jb1+GO2S1M9nO0jakkOpXfYlTAfBG9 HRtsf/+YqdUvWzR2IAla//3SVnDcqQ4hnm7yfIMeUA== X-Google-Smtp-Source: ADUXVKLImKOWMot5szq22hGBSyvuZU9I5z3ZaA2/l7MzGxUJkZV2/fpSfT1w9Yi9YQuJvyNd7lgtM61/nOUSvyf0ghQ= X-Received: by 2002:aca:e249:: with SMTP id z70-v6mr562502oig.127.1528280667811; Wed, 06 Jun 2018 03:24:27 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4a:4081:0:0:0:0:0 with HTTP; Wed, 6 Jun 2018 03:24:26 -0700 (PDT) In-Reply-To: References: From: Khushboo Vashi Date: Wed, 6 Jun 2018 15:54:26 +0530 Message-ID: Subject: Re: [pgadmin4][Patch]: Test cases for the backup module To: Dave Page Cc: Victoria Henry , Joao De Almeida Pereira , pgadmin-hackers Content-Type: multipart/alternative; boundary="000000000000528caa056df69244" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --000000000000528caa056df69244 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jun 6, 2018 at 2:30 PM, Dave Page wrote: > Hi > > I'm seeing various failures with this patch. Many of them appear to be > being caused by the notification popups obscuring elements. Perhaps they > need to be explicitly closed? Errors below, screenshots attached. > Notifications should be taken care by test cases. On my MAC and Linux these are working fine. I will check with someone else's machine. > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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.feature_tests.pg_utilities_backup_restore_test. > PGUtilitiesBackupFeatureTest) > Test for PG utilities - Backup and Restore > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/pg_ > utilities_backup_restore_test.py", line 97, in runTest > self.page.find_by_xpath("//div[contains(@class,'wcFloatingFocus')" > File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_pa= ge.py", > line 171, in find_by_xpath > lambda driver: driver.find_element_by_xpath(xpath) > File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_pa= ge.py", > line 263, in wait_for_element > return self._wait_for("element to exist", element_if_it_exists) > File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_pa= ge.py", > line 337, in _wait_for > "Timed out waiting for " + waiting_for_message > File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site- > packages/selenium/webdriver/support/wait.py", line 80, in until > raise TimeoutException(message, screen, stacktrace) > TimeoutException: Message: Timed out waiting for element to exist > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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.feature_tests.xss_checks_file_manager_test. > CheckFileManagerFeatureTest) > Tests to check if File manager is vulnerable to XSS > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_featu= re_test.py", > line 66, in tearDown > self.after() > File "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/xss_checks_fi= le_manager_test.py", > line 46, in after > self.page.close_query_tool('sql', False) > File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_pa= ge.py", > line 104, in close_query_tool > "//li[contains(@class, 'context-menu-item')]/span[contains(text()," > File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_pa= ge.py", > line 171, in find_by_xpath > lambda driver: driver.find_element_by_xpath(xpath) > File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_pa= ge.py", > line 263, in wait_for_element > return self._wait_for("element to exist", element_if_it_exists) > File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_pa= ge.py", > line 337, in _wait_for > "Timed out waiting for " + waiting_for_message > File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site- > packages/selenium/webdriver/support/wait.py", line 80, in until > raise TimeoutException(message, screen, stacktrace) > TimeoutException: Message: Timed out waiting for element to exist > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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.feature_tests.xss_checks_panels_and_query_tool_ > test.CheckForXssFeatureTest) > Test XSS check for panels and query tool > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/xss_ > checks_panels_and_query_tool_test.py", line 57, in runTest > self.page.add_server(self.server) > File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_pa= ge.py", > line 65, in add_server > self.find_by_xpath("//button[contains(.,'Save')]").click() > File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site- > packages/selenium/webdriver/remote/webelement.py", line 80, in click > self._execute(Command.CLICK_ELEMENT) > File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site- > packages/selenium/webdriver/remote/webelement.py", line 628, in _execute > return self._parent.execute(command, params) > File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site- > packages/selenium/webdriver/remote/webdriver.py", line 312, in execute > self.error_handler.check_response(response) > File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site- > packages/selenium/webdriver/remote/errorhandler.py", line 242, in > check_response > raise exception_class(message, screen, stacktrace) > WebDriverException: Message: unknown error: Element is not > clickable at point (661, 761). Other element would receive the click: class=3D"pg-bg-etime">... > (Session info: chrome=3D66.0.3359.181) > (Driver info: chromedriver=3D2.38.552518 (183d19265345f54ce39cbb94cf81b= a5f15905011),platform=3DMac > OS X 10.12.6 x86_64) > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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.feature_tests.xss_checks_panels_and_query_tool_ > test.CheckForXssFeatureTest) > Test XSS check for panels and query tool > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_featu= re_test.py", > line 66, in tearDown > self.after() > File "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/xss_ > checks_panels_and_query_tool_test.py", line 69, in after > self.page.remove_server(self.server) > File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_pa= ge.py", > line 124, in remove_server > "' and @class=3D'aciTreeItem']") > File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_pa= ge.py", > line 171, in find_by_xpath > lambda driver: driver.find_element_by_xpath(xpath) > File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_pa= ge.py", > line 263, in wait_for_element > return self._wait_for("element to exist", element_if_it_exists) > File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_pa= ge.py", > line 337, in _wait_for > "Timed out waiting for " + waiting_for_message > File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site- > packages/selenium/webdriver/support/wait.py", line 80, in until > raise TimeoutException(message, screen, stacktrace) > TimeoutException: Message: Timed out waiting for element to exist > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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.feature_tests.xss_checks_pgadmin_debugger_test. > CheckDebuggerForXssFeatureTest) > Tests to check if Debugger is vulnerable to XSS > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/xss_ > checks_pgadmin_debugger_test.py", line 41, in runTest > self.page.add_server(self.server) > File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_pa= ge.py", > line 65, in add_server > self.find_by_xpath("//button[contains(.,'Save')]").click() > File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site- > packages/selenium/webdriver/remote/webelement.py", line 80, in click > self._execute(Command.CLICK_ELEMENT) > File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site- > packages/selenium/webdriver/remote/webelement.py", line 628, in _execute > return self._parent.execute(command, params) > File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site- > packages/selenium/webdriver/remote/webdriver.py", line 312, in execute > self.error_handler.check_response(response) > File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site- > packages/selenium/webdriver/remote/errorhandler.py", line 242, in > check_response > raise exception_class(message, screen, stacktrace) > WebDriverException: Message: unknown error: Element is not > clickable at point (661, 761). Other element would receive the click: class=3D"pg-bg-etime">... > (Session info: chrome=3D66.0.3359.181) > (Driver info: chromedriver=3D2.38.552518 (183d19265345f54ce39cbb94cf81b= a5f15905011),platform=3DMac > OS X 10.12.6 x86_64) > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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.feature_tests.xss_checks_pgadmin_debugger_test. > CheckDebuggerForXssFeatureTest) > Tests to check if Debugger is vulnerable to XSS > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_featu= re_test.py", > line 66, in tearDown > self.after() > File "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/xss_ > checks_pgadmin_debugger_test.py", line 46, in after > self.page.remove_server(self.server) > File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_pa= ge.py", > line 124, in remove_server > "' and @class=3D'aciTreeItem']") > File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_pa= ge.py", > line 171, in find_by_xpath > lambda driver: driver.find_element_by_xpath(xpath) > File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_pa= ge.py", > line 263, in wait_for_element > return self._wait_for("element to exist", element_if_it_exists) > File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_pa= ge.py", > line 337, in _wait_for > "Timed out waiting for " + waiting_for_message > File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site- > packages/selenium/webdriver/support/wait.py", line 80, in until > raise TimeoutException(message, screen, stacktrace) > TimeoutException: Message: Timed out waiting for element to exist > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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.feature_tests.xss_checks_roles_control_test. > CheckRoleMembershipControlFeatureTest) > Tests to check if Role membership control is vulnerable to XSS > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/xss_checks_ro= les_control_test.py", > line 37, in runTest > self.page.add_server(self.server) > File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_pa= ge.py", > line 65, in add_server > self.find_by_xpath("//button[contains(.,'Save')]").click() > File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site- > packages/selenium/webdriver/remote/webelement.py", line 80, in click > self._execute(Command.CLICK_ELEMENT) > File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site- > packages/selenium/webdriver/remote/webelement.py", line 628, in _execute > return self._parent.execute(command, params) > File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site- > packages/selenium/webdriver/remote/webdriver.py", line 312, in execute > self.error_handler.check_response(response) > File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site- > packages/selenium/webdriver/remote/errorhandler.py", line 242, in > check_response > raise exception_class(message, screen, stacktrace) > WebDriverException: Message: unknown error: Element is not > clickable at point (661, 761). Other element would receive the click: class=3D"pg-bg-etime">... > (Session info: chrome=3D66.0.3359.181) > (Driver info: chromedriver=3D2.38.552518 (183d19265345f54ce39cbb94cf81b= a5f15905011),platform=3DMac > OS X 10.12.6 x86_64) > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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.feature_tests.xss_checks_roles_control_test. > CheckRoleMembershipControlFeatureTest) > Tests to check if Role membership control is vulnerable to XSS > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_featu= re_test.py", > line 66, in tearDown > self.after() > File "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/xss_checks_ro= les_control_test.py", > line 42, in after > self.page.remove_server(self.server) > File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_pa= ge.py", > line 124, in remove_server > "' and @class=3D'aciTreeItem']") > File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_pa= ge.py", > line 171, in find_by_xpath > lambda driver: driver.find_element_by_xpath(xpath) > File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_pa= ge.py", > line 263, in wait_for_element > return self._wait_for("element to exist", element_if_it_exists) > File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_pa= ge.py", > line 337, in _wait_for > "Timed out waiting for " + waiting_for_message > File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site- > packages/selenium/webdriver/support/wait.py", line 80, in until > raise TimeoutException(message, screen, stacktrace) > TimeoutException: Message: Timed out waiting for element to exist > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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.feature_tests.pg_utilities_maintenance_test. > PGUtilitiesMaintenanceFeatureTest) > Test for PG maintenance: database pg_maintenance > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/pg_ > utilities_maintenance_test.py", line 63, in runTest > self._verify_command() > File "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/pg_ > utilities_maintenance_test.py", line 90, in _verify_command > self.assertEquals(command, "VACUUM " > AssertionError: u'Backing up an object on the server \'Regression - PG 9.= 4 > Feature Tests (localhost:5432)\' from database \'pg_utility_test_db\'...\= nRunning > command:\n/Library/PostgreSQL/9.4/bin/pg_dump --file > "/Users/dpage/test_backup" --host "localhost" --port "5432" --username > "postgres" --no-password --verbose --format=3Dc --blobs "pg_utility_test_= db"' > !=3D 'VACUUM (VERBOSE)\nRunning Query:\nVACUUM VERBOSE;' > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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.feature_tests.pg_utilities_maintenance_test. > PGUtilitiesMaintenanceFeatureTest) > Test for PG maintenance: database > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/pg_ > utilities_maintenance_test.py", line 63, in runTest > self._verify_command() > File "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/pg_ > utilities_maintenance_test.py", line 97, in _verify_command > " public." + self.table_name + ";") > AssertionError: u'Backing up an object on the server \'Regression - PG 9.= 4 > Feature Tests (localhost:5432)\' from database \'pg_utility_test_db\'...\= nRunning > command:\n/Library/PostgreSQL/9.4/bin/pg_dump --file > "/Users/dpage/test_backup" --host "localhost" --port "5432" --username > "postgres" --no-password --verbose --format=3Dc --blobs "pg_utility_test_= db"' > !=3D 'VACUUM (VERBOSE)\nRunning Query:\nVACUUM VERBOSE > public.pg_maintenance_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 > FAIL: runTest (pgadmin.tools.maintenance.tests.test_create_maintenance_ > job.MaintenanceJobTest) > When maintenance the object with the default options > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/Users/dpage/git/pgadmin4/web/pgadmin/tools/maintenance/ > tests/test_create_maintenance_job.py", line 85, in runTest > self.assertIn(self.expected_cmd, process_list[0]['details']) > AssertionError: 'VACUUM VERBOSE' not found in u'
Backing= up > an object on the server \'Regression - PG 9.4 Feature Tests > (localhost:5432)\' from database \'pg_utility_test_db\'...
class=3D"h5">Running command:
enable-selection">/Library/PostgreSQL/9.4/bin/pg_dump --file > "/Users/dpage/test_backup" --host "localhost" --port "5432" --username > "postgres" --no-password --verbose --format=3Dc --blobs > "pg_utility_test_db"
' > > ---------------------------------------------------------------------- > Ran 369 tests in 493.707s > > FAILED (failures=3D3, errors=3D8, skipped=3D21) > > > > On Wed, Jun 6, 2018 at 7:57 AM, Khushboo Vashi < > khushboo.vashi@enterprisedb.com> wrote: > >> Please find the atatched patch with the PEP8 fixes. >> >> On Wed, Jun 6, 2018 at 10:42 AM, Khushboo Vashi < >> khushboo.vashi@enterprisedb.com> wrote: >> >>> Hi Dave, >>> >>> As per our discussion I have added the code to clean up the generated >>> files. >>> Please find the attached updated patch. >>> >>> Thanks, >>> Khushboo >>> >>> On Wed, Jun 6, 2018 at 9:37 AM, Khushboo Vashi < >>> khushboo.vashi@enterprisedb.com> wrote: >>> >>>> Hi Victoria, >>>> >>>> As per the logs, Restore job is failing only for GPDB. As I don't have >>>> setup for the greenplum database, can you please check this functional= ity >>>> works well in pgAdmin4 with GPDB? >>>> >>>> Thanks, >>>> Khushboo >>>> >>>> On Wed, Jun 6, 2018 at 5:13 AM, Victoria Henry >>>> wrote: >>>> >>>>> Hi Khushboo >>>>> >>>>> The tests are still failing and seems flaky: >>>>> https://gpdb-dev.bosh.pivotalci.info/teams/pgadmin/pipelines >>>>> /pgadmin-patch/jobs/run-tests/builds/113 >>>>> >>>>> Sincerely, >>>>> >>>>> Victoria >>>>> >>>>> On Tue, Jun 5, 2018 at 4:50 AM Khushboo Vashi < >>>>> khushboo.vashi@enterprisedb.com> wrote: >>>>> >>>>>> >>>>>> >>>>>> On Tue, Jun 5, 2018 at 2:09 PM, Dave Page wrote: >>>>>> >>>>>>> >>>>>>> >>>>>>> On Tue, Jun 5, 2018 at 9:37 AM, Khushboo Vashi < >>>>>>> khushboo.vashi@enterprisedb.com> wrote: >>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On Tue, Jun 5, 2018 at 1:36 PM, Dave Page >>>>>>>> wrote: >>>>>>>> >>>>>>>>> Hi >>>>>>>>> >>>>>>>>> On Tue, Jun 5, 2018 at 4:39 AM, Khushboo Vashi < >>>>>>>>> khushboo.vashi@enterprisedb.com> wrote: >>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On Mon, Jun 4, 2018 at 8:41 PM, Joao De Almeida Pereira < >>>>>>>>>> jdealmeidapereira@pivotal.io> wrote: >>>>>>>>>> >>>>>>>>>>> Hi Khushboo, >>>>>>>>>>> >>>>>>>>>>> Some tests are failing in greenplum: >>>>>>>>>>> https://gpdb-dev.bosh.pivotalci.info/teams/pgadmin/pipelines >>>>>>>>>>> /pgadmin-patch/jobs/run-tests/builds/108 >>>>>>>>>>> The piece of code responsible for the error is: >>>>>>>>>>> >>>>>>>>>>> if server['default_binary_paths'] is not None: >>>>>>>>>>> test_utils.set_preference(server['default_binary_paths']) >>>>>>>>>>> >>>>>>>>>>> config.DEFAULT_BINARY_PATHS =3D { >>>>>>>>>>> "pg": str(server['default_binary_paths']['pg']), >>>>>>>>>>> "ppas": str(server['default_binary_paths']['ppas']), >>>>>>>>>>> "gpdb": "" >>>>>>>>>>> } >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Can you send me the test_config.json file? The above code sets >>>>>>>>>> the paths to the SQLite database and through the logs couldn't f= igure out >>>>>>>>>> the exact failure. >>>>>>>>>> >>>>>>>>> >>>>>>>>> It seems clear from the code shown that it's not setting the >>>>>>>>> binary paths for gpdb database servers. Shouldn't it be something= like: >>>>>>>>> >>>>>>>>> config.DEFAULT_BINARY_PATHS =3D { >>>>>>>>> "pg": str(server['default_binary_paths']['pg']), >>>>>>>>> "ppas": str(server['default_binary_paths']['ppas']), >>>>>>>>> "gpdb": str(server['default_binary_paths']['gpdb']) >>>>>>>>> } >>>>>>>>> >>>>>>>>> Without this code, the test cases should work as I already set >>>>>>>> paths through below code. >>>>>>>> >>>>>>>> test_utils.set_preference(server['default_binary_paths']) >>>>>>>> >>>>>>>> >>>>>>> In that case, why is the code above required at all? >>>>>>> >>>>>>> My bad. Removed this code and also updated set_preference function >>>>>> for greenplum database. >>>>>> Please find the attached updated patch. >>>>>> >>>>>>> >>>>>>> >>>>>>>> >>>>>>>>> >>>>>>>>>> test_backup_utils.py file name is misleading, these are not >>>>>>>>>>> tests, are helpers. >>>>>>>>>>> =E2=80=8B >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Thanks >>>>>>>>>>> Victoria & Joao >>>>>>>>>>> >>>>>>>>>>> On Mon, Jun 4, 2018 at 1:36 AM Khushboo Vashi < >>>>>>>>>>> khushboo.vashi@enterprisedb.com> wrote: >>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> On Sat, Jun 2, 2018 at 3:01 AM, Dave Page >>>>>>>>>>>> wrote: >>>>>>>>>>>> >>>>>>>>>>>>> Hi >>>>>>>>>>>>> >>>>>>>>>>>>> This looks good, except that it's leaving the >>>>>>>>>>>>> test_restore_database behind. Can we clean that up please? >>>>>>>>>>>>> >>>>>>>>>>>>> PFA updated patch. >>>>>>>>>>>> >>>>>>>>>>>>> Thanks. >>>>>>>>>>>>> >>>>>>>>>>>>> On Fri, Jun 1, 2018 at 7:06 AM, Khushboo Vashi < >>>>>>>>>>>>> khushboo.vashi@enterprisedb.com> wrote: >>>>>>>>>>>>> >>>>>>>>>>>>>> Hi Victoria, >>>>>>>>>>>>>> >>>>>>>>>>>>>> Thanks for reviewing the patch. >>>>>>>>>>>>>> The tests were failing due to the latest commit >>>>>>>>>>>>>> #2b4605a9d390cb44e5dfe9967c3adf2b28d04f1f - Ensure >>>>>>>>>>>>>> backup/restore/maintenance work via SSH tunnels. Fixes #3355 >>>>>>>>>>>>>> >>>>>>>>>>>>>> I have fixed the issues and attached the updated patch. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>> Khushboo >>>>>>>>>>>>>> >>>>>>>>>>>>>> On Thu, May 31, 2018 at 10:00 PM, Victoria Henry < >>>>>>>>>>>>>> vhenry@pivotal.io> wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>>> Hi there, >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> We've been noticing some issues with the tests on both our >>>>>>>>>>>>>>> CI and local Mac workstations. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> 1. When the following code blocks are invoked - we get >>>>>>>>>>>>>>> plenty of app.context() issues. It must not be valid >>>>>>>>>>>>>>> when running tests. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> =E2=80=8B >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> from pgadmin.utils.driver import get_driver >>>>>>>>>>>>>>> driver =3D get_driver(PG_DEFAULT_DRIVER) >>>>>>>>>>>>>>> manager =3D driver.connection_manager(self.sid) >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> host =3D manager.local_bind_host if manager.use_ssh_tunnel = else s.host >>>>>>>>>>>>>>> port =3D manager.local_bind_port if manager.use_ssh_tunnel = else s.port >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> 2. When we finally enable >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> "default_binary_paths": { >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> in our test_config, we get more failing tests that look lik= e: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=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.tools.restore.tests.test_restore_cre= ate_job_unit_test.RestoreCreateJobTest) >>>>>>>>>>>>>>> When restore object with option - Miscellaneous >>>>>>>>>>>>>>> -----------------------------------------------------------= ----------- >>>>>>>>>>>>>>> Traceback (most recent call last): >>>>>>>>>>>>>>> File "/Users/pivotal/.pyenv/versions/3.6.5/lib/python3.6/= unittest/mock.py", line 1179, in patched >>>>>>>>>>>>>>> return func(*args, **keywargs) >>>>>>>>>>>>>>> File "/Users/pivotal/workspace/pgadmin4/web/pgadmin/tools= /restore/tests/test_restore_create_job_unit_test.py", line 295, in runTest >>>>>>>>>>>>>>> self.assertEquals(response.status_code, 200) >>>>>>>>>>>>>>> AssertionError: 410 !=3D 200 >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> And >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> When restore object with the sections options ... 2018-05-3= 1 12:24:42,988: ERROR pgadmin: illegal environment variable name >>>>>>>>>>>>>>> Traceback (most recent call last): >>>>>>>>>>>>>>> File "/Users/pivotal/workspace/pgadmin4/web/pgadmin/tools= /restore/__init__.py", line 352, in create_restore_job >>>>>>>>>>>>>>> manager.export_password_env(p.id) >>>>>>>>>>>>>>> File "/Users/pivotal/workspace/pgadmin4/web/pgadmin/utils= /driver/psycopg2/server_manager.py", line 365, in export_password_env >>>>>>>>>>>>>>> os.environ[str(env)] =3D password >>>>>>>>>>>>>>> File "/Users/pivotal/.pyenv/versions/3.6.5/lib/python3.6/= os.py", line 675, in __setitem__ >>>>>>>>>>>>>>> self.putenv(key, value) >>>>>>>>>>>>>>> ValueError: illegal environment variable name >>>>>>>>>>>>>>> FAIL >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> =E2=80=8B >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Sincerely, >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Victoria && Anthony >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> On Thu, May 31, 2018 at 1:16 AM Khushboo Vashi < >>>>>>>>>>>>>>> khushboo.vashi@enterprisedb.com> wrote: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Hi, >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Please find the attached updated patch with the fixes. >>>>>>>>>>>>>>>> The test cases were only failing on MAC not on Linux. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>>>> Khushboo >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> On Wed, May 30, 2018 at 10:13 AM, Khushboo Vashi < >>>>>>>>>>>>>>>> khushboo.vashi@enterprisedb.com> wrote: >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> On Wed, May 30, 2018 at 1:05 AM, Dave Page < >>>>>>>>>>>>>>>>> dpage@pgadmin.org> wrote: >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Hi >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> On Mon, May 28, 2018 at 8:09 AM, Khushboo Vashi < >>>>>>>>>>>>>>>>>> khushboo.vashi@enterprisedb.com> wrote: >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Hi, >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> please find the attached updated patch for the test >>>>>>>>>>>>>>>>>>> cases of Backup, Restore and Maintenance modules which = includes: >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> 1. Unit test cases >>>>>>>>>>>>>>>>>>> 2. End to end regression test cases >>>>>>>>>>>>>>>>>>> 3. Feature test cases >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Thanks. I've yet to be able to run the feature tests >>>>>>>>>>>>>>>>>> successfully. Here's what I've found so far: >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> 1) DEFAULT_BINARY_PATHS should be default_binary_paths i= n >>>>>>>>>>>>>>>>>> the JSON config file. >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Will do. >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> 2) I've hit screensize related issues: >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>>>>>>>>>>>>>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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.feature_tests.pg_util >>>>>>>>>>>>>>>>>> ities_maintenance_test.PGUtilitiesMaintenanceFeatureTest= ) >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Test for PG maintenance: database >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> ------------------------------ >>>>>>>>>>>>>>>>>> ---------------------------------------- >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Traceback (most recent call last): >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> File "/Users/dpage/git/pgadmin4/web >>>>>>>>>>>>>>>>>> /pgadmin/feature_tests/pg_utilities_maintenance_test.py"= , >>>>>>>>>>>>>>>>>> line 56, in runTest >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> self._open_maintenance_dialogue() >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> File "/Users/dpage/git/pgadmin4/web >>>>>>>>>>>>>>>>>> /pgadmin/feature_tests/pg_utilities_maintenance_test.py"= , >>>>>>>>>>>>>>>>>> line 75, in _open_maintenance_dialogue >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> "*[.=3D'" + self.table_name + >>>>>>>>>>>>>>>>>> "']/../*[@class=3D'aciTreeItem'" >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> File "/Users/dpage/.virtualenvs/pga >>>>>>>>>>>>>>>>>> dmin4/lib/python2.7/site-packa >>>>>>>>>>>>>>>>>> ges/selenium/webdriver/remote/webelement.py", line 80, >>>>>>>>>>>>>>>>>> in click >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> self._execute(Command.CLICK_ELEMENT) >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> File "/Users/dpage/.virtualenvs/pga >>>>>>>>>>>>>>>>>> dmin4/lib/python2.7/site-packa >>>>>>>>>>>>>>>>>> ges/selenium/webdriver/remote/webelement.py", line 628, >>>>>>>>>>>>>>>>>> in _execute >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> return self._parent.execute(command, params) >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> File "/Users/dpage/.virtualenvs/pga >>>>>>>>>>>>>>>>>> dmin4/lib/python2.7/site-packa >>>>>>>>>>>>>>>>>> ges/selenium/webdriver/remote/webdriver.py", line 312, >>>>>>>>>>>>>>>>>> in execute >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> self.error_handler.check_response(response) >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> File "/Users/dpage/.virtualenvs/pga >>>>>>>>>>>>>>>>>> dmin4/lib/python2.7/site-packa >>>>>>>>>>>>>>>>>> ges/selenium/webdriver/remote/errorhandler.py", line >>>>>>>>>>>>>>>>>> 242, in check_response >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> raise exception_class(message, screen, stacktrace) >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> WebDriverException: Message: unknown error: Element >>>>>>>>>>>>>>>>> class=3D"aciTreeItem">... is not clickable at poi= nt (223, 604). Other >>>>>>>>>>>>>>>>>> element would receive the click:
>>>>>>>>>>>>>>>>> wcPanelBackground wcScrollableX wcScrollableY" style=3D"= left: 0px; right: >>>>>>>>>>>>>>>>>> 0px; bottom: 0px;">...
>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> (Session info: chrome=3D66.0.3359.181) >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> (Driver info: chromedriver=3D2.38.552518 >>>>>>>>>>>>>>>>>> (183d19265345f54ce39cbb94cf81ba5f15905011),platform=3DMa= c >>>>>>>>>>>>>>>>>> OS X 10.12.6 x86_64) >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> 3) One time the test did start, but then I saw this >>>>>>>>>>>>>>>>>> failure: >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>>>>>>>>>>>>>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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.feature_tests.pg_util >>>>>>>>>>>>>>>>>> ities_backup_restore_test.PGUtilitiesBackupFeatureTest) >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Test for PG utilities - Backup and Restore >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> ------------------------------ >>>>>>>>>>>>>>>>>> ---------------------------------------- >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Traceback (most recent call last): >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> File "/Users/dpage/git/pgadmin4/web >>>>>>>>>>>>>>>>>> /pgadmin/feature_tests/pg_utilities_backup_restore_test.= py", >>>>>>>>>>>>>>>>>> line 93, in runTest >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> self.page.fill_input_by_field_name("file", >>>>>>>>>>>>>>>>>> "test_backup_file") >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> File "/Users/dpage/git/pgadmin4/web >>>>>>>>>>>>>>>>>> /regression/feature_utils/pgadmin_page.py", line 211, in >>>>>>>>>>>>>>>>>> fill_input_by_field_name >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> self.wait_for_input_field_content(field_name, >>>>>>>>>>>>>>>>>> field_content) >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> File "/Users/dpage/git/pgadmin4/web >>>>>>>>>>>>>>>>>> /regression/feature_utils/pgadmin_page.py", line 251, in >>>>>>>>>>>>>>>>>> wait_for_input_field_content >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> "field to contain '" + str(content) + "'", >>>>>>>>>>>>>>>>>> input_field_has_content >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> File "/Users/dpage/git/pgadmin4/web >>>>>>>>>>>>>>>>>> /regression/feature_utils/pgadmin_page.py", line 337, in >>>>>>>>>>>>>>>>>> _wait_for >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> "Timed out waiting for " + waiting_for_message >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> File "/Users/dpage/.virtualenvs/pga >>>>>>>>>>>>>>>>>> dmin4/lib/python2.7/site-packa >>>>>>>>>>>>>>>>>> ges/selenium/webdriver/support/wait.py", line 80, in >>>>>>>>>>>>>>>>>> until >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> raise TimeoutException(message, screen, stacktrace) >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> TimeoutException: Message: Timed out waiting for field t= o >>>>>>>>>>>>>>>>>> contain 'test_backup_file' >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> (with screenshot attached) >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Thanks. >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> I have ran the feature tests with multiple servers many >>>>>>>>>>>>>>>>> times but didn't get a single failure. >>>>>>>>>>>>>>>>> I have asked Akshay to run on his machine, let see what h= e >>>>>>>>>>>>>>>>> gets. >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>>>>>>> Khushboo >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> On Wed, Apr 25, 2018 at 9:40 PM, Joao De Almeida Pereir= a >>>>>>>>>>>>>>>>>>> wrote: >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Hi Khushboo, >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> We reviewed the patch and it is very nice to see some >>>>>>>>>>>>>>>>>>>> more coverage in this area. Good job :D >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> We passed the tests through our CI the feature tests >>>>>>>>>>>>>>>>>>>> are not passing, but the linter fails: >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ./pgadmin/feature_tests/pg_utilities_backup_test.py:37= : [E501] line too long (91 > 79 characters) >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ./pgadmin/feature_tests/pg_utilities_backup_test.py:53= : [E501] line too long (104 > 79 characters) >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ./pgadmin/feature_tests/pg_utilities_backup_test.py:59= : [E501] line too long (85 > 79 characters) >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ./pgadmin/feature_tests/pg_utilities_backup_test.py:62= : [E501] line too long (96 > 79 characters) >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ./pgadmin/feature_tests/pg_utilities_backup_test.py:63= : [E501] line too long (91 > 79 characters) >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ./pgadmin/feature_tests/pg_utilities_backup_test.py:70= : [E501] line too long (118 > 79 characters) >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ./pgadmin/tools/backup/tests/test_backup_message.py:37= : [E121] continuation line under-indented for hanging indent >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ./pgadmin/tools/backup/tests/test_backup_message.py:48= : [E122] continuation line missing indentation or outdented >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ./pgadmin/tools/backup/tests/test_backup_message.py:49= : [E251] unexpected spaces around keyword / parameter equals >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ./pgadmin/tools/backup/tests/test_backup_message.py:49= : [E251] unexpected spaces around keyword / parameter equals >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ./pgadmin/tools/backup/tests/test_backup_message.py:51= : [E501] line too long (91 > 79 characters) >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ./pgadmin/tools/backup/tests/test_backup_message.py:52= : [E501] line too long (94 > 79 characters) >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ./pgadmin/tools/backup/tests/test_backup_message.py:53= : [E501] line too long (108 > 79 characters) >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ./pgadmin/tools/backup/tests/test_backup_message.py:81= : [E501] line too long (113 > 79 characters) >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ./pgadmin/tools/backup/tests/test_backup_message.py:82= : [E501] line too long (94 > 79 characters) >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ./pgadmin/tools/backup/tests/test_backup_message.py:83= : [E501] line too long (108 > 79 characters) >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ./pgadmin/tools/backup/tests/test_backup_message.py:11= 1: [E501] line too long (100 > 79 characters) >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ./pgadmin/tools/backup/tests/test_backup_message.py:11= 3: [E501] line too long (94 > 79 characters) >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ./pgadmin/tools/backup/tests/test_backup_message.py:11= 4: [E501] line too long (108 > 79 characters) >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ./pgadmin/tools/backup/tests/test_backup_message.py:14= 7: [E501] line too long (93 > 79 characters) >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ./pgadmin/tools/backup/tests/test_batch_process.py:40:= [E121] continuation line under-indented for hanging indent >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ./pgadmin/tools/backup/tests/test_batch_process.py:51:= [E122] continuation line missing indentation or outdented >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ./pgadmin/tools/backup/tests/test_batch_process.py:135= : [E501] line too long (80 > 79 characters) >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ./pgadmin/tools/backup/tests/test_batch_process.py:137= : [E501] line too long (83 > 79 characters) >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ./pgadmin/tools/backup/tests/test_batch_process.py:138= : [E122] continuation line missing indentation or outdented >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ./pgadmin/tools/backup/tests/test_batch_process.py:139= : [E122] continuation line missing indentation or outdented >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ./pgadmin/tools/backup/tests/test_batch_process.py:140= : [E122] continuation line missing indentation or outdented >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ./pgadmin/tools/backup/tests/test_batch_process.py:191= : [E501] line too long (81 > 79 characters) >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ./pgadmin/tools/backup/tests/test_batch_process.py:203= : [E501] line too long (80 > 79 characters) >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ./pgadmin/tools/backup/tests/test_batch_process.py:204= : [E128] continuation line under-indented for visual indent >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ./pgadmin/tools/backup/tests/test_batch_process.py:204= : [E501] line too long (94 > 79 characters) >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ./pgadmin/tools/backup/tests/test_batch_process.py:205= : [E128] continuation line under-indented for visual indent >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ./pgadmin/tools/backup/tests/test_batch_process.py:205= : [E501] line too long (94 > 79 characters) >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ./pgadmin/tools/backup/tests/test_batch_process.py:216= : [W391] blank line at end of file >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ./pgadmin/tools/backup/tests/test_create_backup_job.py= :296: [E501] line too long (97 > 79 characters) >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ./pgadmin/tools/backup/tests/test_create_backup_job.py= :317: [E303] too many blank lines (2) >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ./pgadmin/tools/backup/tests/test_create_backup_job.py= :336: [E501] line too long (84 > 79 characters) >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ./pgadmin/tools/backup/tests/test_create_backup_job.py= :371: [W391] blank line at end of file >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> 2 E121 continuation line under-indented for hang= ing indent >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> 5 E122 continuation line missing indentation or = outdented >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> 2 E128 continuation line under-indented for visu= al indent >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> 2 E251 unexpected spaces around keyword / parame= ter equals >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> 1 E303 too many blank lines (2) >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> 24 E501 line too long (91 > 79 characters) >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> 2 W391 blank line at end of file >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> 38 >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> For the feature tests, we realized we had to update th= e >>>>>>>>>>>>>>>>>>>> configuration, and we did that, but we get the followi= ng error attached. We >>>>>>>>>>>>>>>>>>>> spent some time trying to understand the problem but w= e were not successful. >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Codewise: >>>>>>>>>>>>>>>>>>>> - We just found some One Letter Variables in the code.= .. >>>>>>>>>>>>>>>>>>>> - Looks like there is a bug report in this area of the >>>>>>>>>>>>>>>>>>>> code and we do not have coverage for it: >>>>>>>>>>>>>>>>>>>> https://redmine.postgresql.org/issues/3232 >>>>>>>>>>>>>>>>>>>> Looks like in some of the unit tests we only have >>>>>>>>>>>>>>>>>>>> happy path tests, maybe we should see if there are any= sad paths that also >>>>>>>>>>>>>>>>>>>> need coverage. >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> The configuration change, maybe need to be updated. >>>>>>>>>>>>>>>>>>>> When we install multiple versions of postgres the bina= ries live in >>>>>>>>>>>>>>>>>>>> `/usr/lib/postgresql/{{db_version}}/bin`, which makes >>>>>>>>>>>>>>>>>>>> us think that this configuration should live near the = server configuration, >>>>>>>>>>>>>>>>>>>> maybe? Also to maintain coherency on the naming maybe = we should make it all >>>>>>>>>>>>>>>>>>>> lower case. >>>>>>>>>>>>>>>>>>>> Just as an aside, you can add the gpdb configuration a= s >>>>>>>>>>>>>>>>>>>> well in you patch. >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Thanks >>>>>>>>>>>>>>>>>>>> Victoria & Joao >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> On Wed, Apr 25, 2018 at 5:20 AM Khushboo Vashi < >>>>>>>>>>>>>>>>>>>> khushboo.vashi@enterprisedb.com> wrote: >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> Hi, >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> Please find the attached patch which covers test case= s >>>>>>>>>>>>>>>>>>>>> for the backup module (RM #3206). >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> 1. Unit test cases >>>>>>>>>>>>>>>>>>>>> 2. End to end regression test cases >>>>>>>>>>>>>>>>>>>>> 3. Feature test cases >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>>>>>>>>> Khushboo >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>> >>> >> > > > -- > Dave Page > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake > > EnterpriseDB UK: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > --000000000000528caa056df69244 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Wed, Jun 6, 2018 at 2:30 PM, Dave Page <dpage@pgadmin.org> wrote:
Hi

=
I'm seeing various failures with this patch. Many of them ap= pear to be being caused by the notification popups obscuring elements. Perh= aps they need to be explicitly closed? Errors below, screenshots attached.<= /div>
Notifications should be taken care = by test cases. On my MAC and Linux these are working fine.
I will= check with someone else's machine.
=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
ER= ROR: runTest (pgadmin.feature_tests.pg_utilities_backup_restore_test.<= wbr>PGUtilitiesBackupFeatureTest)
Test for PG utilities - Backup = and Restore
------------------------------------------------= ----------------------
Traceback (most recent call last):
=C2=A0 File "/Users/dpage/git/pgadmin4/web/pgadmin/featur= e_tests/pg_utilities_backup_restore_test.py", line 97, in ru= nTest
=C2=A0 =C2=A0 self.page.find_by_xpath("//div[cont= ains(@class,'wcFloatingFocus')"
=C2=A0 File &qu= ot;/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin= _page.py", line 171, in find_by_xpath
=C2=A0 =C2=A0 lambda d= river: driver.find_element_by_xpath(xpath)
=C2=A0 File "= ;/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_p= age.py", line 263, in wait_for_element
=C2=A0 =C2=A0 return = self._wait_for("element to exist", element_if_it_exists)
=C2=A0 File "/Users/dpage/git/pgadmin4/web/regression/feature_u= tils/pgadmin_page.py", line 337, in _wait_for
=C2=A0 = =C2=A0 "Timed out waiting for " + waiting_for_message
= =C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/sit= e-packages/selenium/webdriver/support/wait.py", line 80, in = until
=C2=A0 =C2=A0 raise TimeoutException(message, screen, stack= trace)
TimeoutException: Message: Timed out waiting for element t= o exist


=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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 (pgad= min.feature_tests.xss_checks_file_manager_test.CheckFileManagerFe= atureTest)
Tests to check if File manager is vulnerable to XSS
----------------------------------------------------------------------
Traceback (most recent call last):
=C2=A0= File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py", line 66, in tearDown
=C2=A0 =C2=A0 = self.after()
=C2=A0 File "/Users/dpage/git/pgadmin4/web= /pgadmin/feature_tests/xss_checks_file_manager_test.py", line 46,= in after
=C2=A0 =C2=A0 self.page.close_query_tool('sql&= #39;, False)
=C2=A0 File "/Users/dpage/git/pgadmin4/web= /regression/feature_utils/pgadmin_page.py", line 104, in close_qu= ery_tool
=C2=A0 =C2=A0 "//li[contains(@class, 'context-m= enu-item')]/span[contains(text(),"
=C2=A0 File &quo= t;/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_= page.py", line 171, in find_by_xpath
=C2=A0 =C2=A0 lambda dr= iver: driver.find_element_by_xpath(xpath)
=C2=A0 File "= /Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_pa= ge.py", line 263, in wait_for_element
=C2=A0 =C2=A0 return s= elf._wait_for("element to exist", element_if_it_exists)
=C2=A0 File "/Users/dpage/git/pgadmin4/web/regression/feature_ut= ils/pgadmin_page.py", line 337, in _wait_for
=C2=A0 =C2= =A0 "Timed out waiting for " + waiting_for_message
=C2= =A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-<= wbr>packages/selenium/webdriver/support/wait.py", line 80, in unt= il
=C2=A0 =C2=A0 raise TimeoutException(message, screen, stacktra= ce)
TimeoutException: Message: Timed out waiting for element to e= xist


=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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= .feature_tests.xss_checks_panels_and_query_tool_test.CheckForXssF= eatureTest)
Test XSS check for panels and query tool
--= -----------------------------------------------------------------= ---
Traceback (most recent call last):
=C2=A0 File &quo= t;/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/xss_checks_= panels_and_query_tool_test.py", line 57, in runTest
=C2= =A0 =C2=A0 self.page.add_server(self.server)
=C2=A0 File &qu= ot;/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin= _page.py", line 65, in add_server
=C2=A0 =C2=A0 self.find_by= _xpath("//button[contains(.,'Save')]").click()
=
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.= 7/site-packages/selenium/webdriver/remote/webelement.py", li= ne 80, in click
=C2=A0 =C2=A0 self._execute(Command.CLICK_EL= EMENT)
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/= lib/python2.7/site-packages/selenium/webdriver/remote/webelement.= py", line 628, in _execute
=C2=A0 =C2=A0 return self._parent= .execute(command, params)
=C2=A0 File "/Users/dpage/.virtual= envs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 312, in execute
=C2=A0 =C2=A0 se= lf.error_handler.check_response(response)
=C2=A0 File "= /Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/se= lenium/webdriver/remote/errorhandler.py", line 242, in check_resp= onse
=C2=A0 =C2=A0 raise exception_class(message, screen, stacktr= ace)
WebDriverException: Message: unknown error: Element <butt= on type=3D"save" class=3D"btn btn-primary" title=3D&quo= t;Save this object.">...</button> is not clickable at point (= 661, 761). Other element would receive the click: <div class=3D"pg-= bg-etime">...</div>
=C2=A0 (Session info: chrome=3D= 66.0.3359.181)
=C2=A0 (Driver info: chromedriver=3D2.38.552518 (<= wbr>183d19265345f54ce39cbb94cf81ba5f15905011),platform=3DMac OS X 10.1= 2.6 x86_64)


=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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.feature_tests.xss_checks_panels_and_query_tool_test.Che= ckForXssFeatureTest)
Test XSS check for panels and query tool
----------------------------------------------------------------------
Traceback (most recent call last):
=C2=A0 = File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py", line 66, in tearDown
=C2=A0 =C2=A0 s= elf.after()
=C2=A0 File "/Users/dpage/git/pgadmin4/web/= pgadmin/feature_tests/xss_checks_panels_and_query_tool_test.py&qu= ot;, line 69, in after
=C2=A0 =C2=A0 self.page.remove_server(self= .server)
=C2=A0 File "/Users/dpage/git/pgadmin4/we= b/regression/feature_utils/pgadmin_page.py", line 124, in remove_= server
=C2=A0 =C2=A0 "' and @class=3D'aciTreeItem= 9;]")
=C2=A0 File "/Users/dpage/git/pgadmin4/web/r= egression/feature_utils/pgadmin_page.py", line 171, in find_by_xp= ath
=C2=A0 =C2=A0 lambda driver: driver.find_element_by_xpath(xpath)
=C2=A0 File "/Users/dpage/git/pgadmin4/web/reg= ression/feature_utils/pgadmin_page.py", line 263, in wait_for_ele= ment
=C2=A0 =C2=A0 return self._wait_for("element to exist&q= uot;, element_if_it_exists)
=C2=A0 File "/Users/dpage/git/pg= admin4/web/regression/feature_utils/pgadmin_page.py", line 3= 37, in _wait_for
=C2=A0 =C2=A0 "Timed out waiting for "= + waiting_for_message
=C2=A0 File "/Users/dpage/.virtualenv= s/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/su= pport/wait.py", line 80, in until
=C2=A0 =C2=A0 raise Timeou= tException(message, screen, stacktrace)
TimeoutException: Message= : Timed out waiting for element to exist


=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =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.feature_tests.xss_checks_pgadmin= _debugger_test.CheckDebuggerForXssFeatureTest)
Tests to= check if Debugger is vulnerable to XSS
-------------------------= ---------------------------------------------
Traceback= (most recent call last):
=C2=A0 File "/Users/dpage/git/pgad= min4/web/pgadmin/feature_tests/xss_checks_pgadmin_debugger_test.<= wbr>py", line 41, in runTest
=C2=A0 =C2=A0 self.page.add_ser= ver(self.server)
=C2=A0 File "/Users/dpage/git/pgadmin4= /web/regression/feature_utils/pgadmin_page.py", line 65, in = add_server
=C2=A0 =C2=A0 self.find_by_xpath("//button[c= ontains(.,'Save')]").click()
=C2=A0 File "/User= s/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/seleniu= m/webdriver/remote/webelement.py", line 80, in click
= =C2=A0 =C2=A0 self._execute(Command.CLICK_ELEMENT)
=C2=A0 Fi= le "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-pa= ckages/selenium/webdriver/remote/webelement.py", line 628, in _ex= ecute
=C2=A0 =C2=A0 return self._parent.execute(command, params)<= /div>
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/pyt= hon2.7/site-packages/selenium/webdriver/remote/webdriver.py"= , line 312, in execute
=C2=A0 =C2=A0 self.error_handler.check_response(response)
=C2=A0 File "/Users/dpage/.virtualenvs/= pgadmin4/lib/python2.7/site-packages/selenium/webdriver/remo= te/errorhandler.py", line 242, in check_response
=C2=A0 =C2= =A0 raise exception_class(message, screen, stacktrace)
WebDriverE= xception: Message: unknown error: Element <button type=3D"save"= ; class=3D"btn btn-primary" title=3D"Save this object."= >...</button> is not clickable at point (661, 761). Other element = would receive the click: <div class=3D"pg-bg-etime">...<= /div>
=C2=A0 (Session info: chrome=3D66.0.3359.181)
= =C2=A0 (Driver info: chromedriver=3D2.38.552518 (183d19265345f54ce39cb= b94cf81ba5f15905011),platform=3DMac OS X 10.12.6 x86_64)

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=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.feature_tests.xs= s_checks_pgadmin_debugger_test.CheckDebuggerForXssFeatureTest)
Tests to check if Debugger is vulnerable to XSS
----= -----------------------------------------------------------------= -
Traceback (most recent call last):
=C2=A0 File "= /Users/dpage/git/pgadmin4/web/regression/feature_utils/base_featu= re_test.py", line 66, in tearDown
=C2=A0 =C2=A0 self.after()=
=C2=A0 File "/Users/dpage/git/pgadmin4/web/pgadmin/fea= ture_tests/xss_checks_pgadmin_debugger_test.py", line 46, in= after
=C2=A0 =C2=A0 self.page.remove_server(self.server)
=C2=A0 File "/Users/dpage/git/pgadmin4/web/regression/fea= ture_utils/pgadmin_page.py", line 124, in remove_server
=C2=A0 =C2=A0 "' and @class=3D'aciTreeItem']")
=
=C2=A0 File "/Users/dpage/git/pgadmin4/web/regression/featur= e_utils/pgadmin_page.py", line 171, in find_by_xpath
= =C2=A0 =C2=A0 lambda driver: driver.find_element_by_xpath(xpath)
=
=C2=A0 File "/Users/dpage/git/pgadmin4/web/regression/featur= e_utils/pgadmin_page.py", line 263, in wait_for_element
=C2=A0 =C2=A0 return self._wait_for("element to exist", element_= if_it_exists)
=C2=A0 File "/Users/dpage/git/pgadmin4/we= b/regression/feature_utils/pgadmin_page.py", line 337, in _wait_f= or
=C2=A0 =C2=A0 "Timed out waiting for " + waiting_for= _message
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin= 4/lib/python2.7/site-packages/selenium/webdriver/support/wait.py&= quot;, line 80, in until
=C2=A0 =C2=A0 raise TimeoutException(mes= sage, screen, stacktrace)
TimeoutException: Message: Timed out wa= iting for element to exist


=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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.feature_tests.xss_checks_roles_control_test.<= wbr>CheckRoleMembershipControlFeatureTest)
Tests to check if= Role membership control is vulnerable to XSS
-------------------= ---------------------------------------------------
Tra= ceback (most recent call last):
=C2=A0 File "/Users/dpage/gi= t/pgadmin4/web/pgadmin/feature_tests/xss_checks_roles_control_tes= t.py", line 37, in runTest
=C2=A0 =C2=A0 self.page.add_serve= r(self.server)
=C2=A0 File "/Users/dpage/git/pgadmin4/<= wbr>web/regression/feature_utils/pgadmin_page.py", line 65, in ad= d_server
=C2=A0 =C2=A0 self.find_by_xpath("//button[con= tains(.,'Save')]").click()
=C2=A0 File "/Users/= dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/= webdriver/remote/webelement.py", line 80, in click
=C2= =A0 =C2=A0 self._execute(Command.CLICK_ELEMENT)
=C2=A0 File = "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packa= ges/selenium/webdriver/remote/webelement.py", line 628, in _execu= te
=C2=A0 =C2=A0 return self._parent.execute(command, params)
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python= 2.7/site-packages/selenium/webdriver/remote/webdriver.py", l= ine 312, in execute
=C2=A0 =C2=A0 self.error_handler.check_r= esponse(response)
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/remote/= errorhandler.py", line 242, in check_response
=C2=A0 =C2=A0 = raise exception_class(message, screen, stacktrace)
WebDriverExcep= tion: Message: unknown error: Element <button type=3D"save" cl= ass=3D"btn btn-primary" title=3D"Save this object.">= ...</button> is not clickable at point (661, 761). Other element woul= d receive the click: <div class=3D"pg-bg-etime">...</div= >
=C2=A0 (Session info: chrome=3D66.0.3359.181)
=C2= =A0 (Driver info: chromedriver=3D2.38.552518 (183d19265345f54ce39cbb94= cf81ba5f15905011),platform=3DMac OS X 10.12.6 x86_64)


=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=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.feature_tests.xss_<= wbr>checks_roles_control_test.CheckRoleMembershipControlFeatureTe= st)
Tests to check if Role membership control is vulnerable to XS= S
----------------------------------------------------------= ------------
Traceback (most recent call last):
= =C2=A0 File "/Users/dpage/git/pgadmin4/web/regression/feature_uti= ls/base_feature_test.py", line 66, in tearDown
=C2=A0 = =C2=A0 self.after()
=C2=A0 File "/Users/dpage/git/pgadmin4/<= wbr>web/pgadmin/feature_tests/xss_checks_roles_control_test.py", = line 42, in after
=C2=A0 =C2=A0 self.page.remove_server(self.server)
=C2=A0 File "/Users/dpage/git/pgadmin4/web/reg= ression/feature_utils/pgadmin_page.py", line 124, in remove_serve= r
=C2=A0 =C2=A0 "' and @class=3D'aciTreeItem']&q= uot;)
=C2=A0 File "/Users/dpage/git/pgadmin4/web/regres= sion/feature_utils/pgadmin_page.py", line 171, in find_by_xpath
=C2=A0 =C2=A0 lambda driver: driver.find_element_by_xpath(xpa= th)
=C2=A0 File "/Users/dpage/git/pgadmin4/web/regressi= on/feature_utils/pgadmin_page.py", line 263, in wait_for_element<= /div>
=C2=A0 =C2=A0 return self._wait_for("element to exist",= element_if_it_exists)
=C2=A0 File "/Users/dpage/git/pgadmin= 4/web/regression/feature_utils/pgadmin_page.py", line 337, i= n _wait_for
=C2=A0 =C2=A0 "Timed out waiting for " + wa= iting_for_message
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/support= /wait.py", line 80, in until
=C2=A0 =C2=A0 raise TimeoutExce= ption(message, screen, stacktrace)
TimeoutException: Message: Tim= ed out waiting for element to exist


=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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>
FAIL: runTest (pgadmin.feature_tests.pg_utilities_maintenanc= e_test.PGUtilitiesMaintenanceFeatureTest)
Test for PG m= aintenance: database pg_maintenance
-----------------------------= -----------------------------------------
Traceback (mo= st recent call last):
=C2=A0 File "/Users/dpage/git/pgadmin4= /web/pgadmin/feature_tests/pg_utilities_maintenance_test.py"= , line 63, in runTest
=C2=A0 =C2=A0 self._verify_command()
=C2=A0 File "/Users/dpage/git/pgadmin4/web/pgadmin/featu= re_tests/pg_utilities_maintenance_test.py", line 90, in _ver= ify_command
=C2=A0 =C2=A0 self.assertEquals(command, "VACUUM= "
AssertionError: u'Backing up an object on the server = \'Regression - PG 9.4 Feature Tests (localhost:5432)\' from databas= e \'pg_utility_test_db\'...\nRunning command:\n/Library/Postgr= eSQL/9.4/bin/pg_dump --file "/Users/dpage/test_backup" --hos= t "localhost" --port "5432" --username "postgres&q= uot; --no-password --verbose --format=3Dc --blobs "pg_utility_test_db&= quot;' !=3D 'VACUUM (VERBOSE)\nRunning Query:\nVACUUM VERBOSE;'=

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=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.feature_tests.pg_= utilities_maintenance_test.PGUtilitiesMaintenanceFeatureTest= )
Test for PG maintenance: database
-------------------= ---------------------------------------------------
Tra= ceback (most recent call last):
=C2=A0 File "/Users/dpage/gi= t/pgadmin4/web/pgadmin/feature_tests/pg_utilities_maintenance_tes= t.py", line 63, in runTest
=C2=A0 =C2=A0 self._verify_c= ommand()
=C2=A0 File "/Users/dpage/git/pgadmin4/web/pga= dmin/feature_tests/pg_utilities_maintenance_test.py", line 9= 7, in _verify_command
=C2=A0 =C2=A0 " public." + self.t= able_name + ";")
AssertionError: u'Backing up an ob= ject on the server \'Regression - PG 9.4 Feature Tests (localhost:5432)= \' from database \'pg_utility_test_db\'...\nRunning comman= d:\n/Library/PostgreSQL/9.4/bin/pg_dump --file "/Users/dpage/test= _backup" --host "localhost" --port "5432" --userna= me "postgres" --no-password --verbose --format=3Dc --blobs "= pg_utility_test_db"' !=3D 'VACUUM (VERBOSE)\nRunning Query:\nV= ACUUM VERBOSE public.pg_maintenance_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
FAIL: runTest (pgadmin.tools.maintenance.tests.test_create_main= tenance_job.MaintenanceJobTest)
When maintenance the object = with the default options
-----------------------------------= -----------------------------------
Traceback (most recent c= all last):
=C2=A0 File "/Users/dpage/git/pgadmin4/web/p= gadmin/tools/maintenance/tests/test_create_maintenance_job.py&quo= t;, line 85, in runTest
=C2=A0 =C2=A0 self.assertIn(self.expected= _cmd, process_list[0]['details'])
AssertionError: &#= 39;VACUUM VERBOSE' not found in u'<div class=3D"h5">= ;Backing up an object on the server \'Regression - PG 9.4 Feature Tests= (localhost:5432)\' from database \'pg_utility_test_db\'...<= /div><div class=3D"h5">Running command:</b>&l= t;br><span class=3D"pg-bg-cmd enable-selection">/Library= /PostgreSQL/9.4/bin/pg_dump --file "/Users/dpage/test_backup"= ; --host "localhost" --port "5432" --username "pos= tgres" --no-password --verbose --format=3Dc --blobs "pg_utility_t= est_db"</span></div>'

--= -----------------------------------------------------------------= ---
Ran 369 tests in 493.707s

FAILED (fa= ilures=3D3, errors=3D8, skipped=3D21)



On Wed, Jun 6, 2018 at 7:57 AM, Khu= shboo Vashi <khushboo.vashi@enterprisedb.com> wrote:
Please find the atatched patch with the PEP8 fixes.

On Wed, Jun 6, 2018 at 10:4= 2 AM, Khushboo Vashi <khushboo.vashi@enterprisedb.com> wrote:
<= div dir=3D"ltr">Hi Dave,

As per our discussion I have ad= ded the code to clean up the generated files.
Please find the att= ached updated patch.

Thanks,
Khushboo

On Wed, = Jun 6, 2018 at 9:37 AM, Khushboo Vashi <khushboo.vashi@enter= prisedb.com> wrote:
Hi Victoria,

As per th= e logs, Restore job is failing only for GPDB. As I don't have setup for= the greenplum database, can you please check this functionality works well= in pgAdmin4 with GPDB?

Thanks,
Khushboo

On Wed, Jun 6, 2018 at 5:13 AM, Victo= ria Henry <vhenry@pivotal.io> wrote:
Hi Khushboo
<= br>
The tests are still failing and seems flaky:

Sincerely,

= Victoria

O= n Tue, Jun 5, 2018 at 4:50 AM Khushboo Vashi <khushboo.vashi@enterprisedb.com> wrote:


On Tue, Jun 5, 2018 at 2:09 PM, Dave Page <dpage@pgadmin.org&g= t; wrote:


<= span>On Tue, Jun 5, 2018 at 9:37 AM, Khushboo Vashi <<= a href=3D"mailto:khushboo.vashi@enterprisedb.com" target=3D"_blank">khushbo= o.vashi@enterprisedb.com> wrote:


On Tue, Jun 5, 2018 at 1:36 PM, Dav= e Page <dpage@pgadmin.org> wrote:
Hi

On Tue, Jun 5, 2018 at = 4:39 AM, Khushboo Vashi <khushboo.vashi@enterprisedb.co= m> wrote:


On Mon, Jun 4, 2018 at 8:41 PM, Joao De Almeida Pereira <jdealmeidapereira@pivotal.io> wrote:
Hi Khushboo,
Some tests are failing in greenplum:
The piece of code responsible for the error i= s:
if server['default_binary_paths'] is not None:
test_utils.set_preference(server['default_binary_paths'])
config.DEFAULT_BINARY_PATHS =3D {
"pg": str(server['default_b= inary_paths']['pg= ']),
"ppas": str(server['default_binary_paths']['ppas']),
&quo= t;gpdb": ""
=
}

Can you send me the test_config.json file?=C2= =A0 The above code sets the paths to the SQLite database and through the lo= gs couldn't figure out the exact failure.=C2=A0
=

It seems clear from the code shown = that it's not setting the binary paths for gpdb database servers. Shoul= dn't it be something like:

    config.DEFAULT_BINAR=
Y_PATHS =3D {
"pg&quo= t;: str(server['default_binary_paths'][= 'pg']),
= "ppas": = str(server['default_binary_paths']['ppas']),
= "gpdb": st= r(server['default_binary_paths']['gpdb'])
}
Witho= ut this code, the test cases should work as I already set=C2=A0 paths throu= gh below code.
    test_utils.set_preference(server['default_binary_paths'])
<= div>

In that case, why is the code above required at all?=

My bad. Removed this code and also updated set_preference function for gr= eenplum database.
Please find the attached updated patch.
=C2=A0<= /div>
=C2=A0

test_backup_utils.py= file name is misleading, these are not tests, are helpers.

=E2= =80=8B


Thanks
Victoria & Joao

On Mon, Jun 4, 2018 at 1:36 AM Khushboo = Vashi <khushboo.vashi@enterprisedb.com> wrote:


On Sat, Jun 2, 2018 at 3:01 AM,= Dave Page <dpage@pgadmin.org> wrote:
Hi

Thi= s looks good, except that it's leaving the test_restore_database behind= . Can we clean that up please?

= PFA updated patch.=C2=A0
Thanks.

On Fri, Jun 1, 2018 at 7:06 AM, Khushboo Vashi <= khushb= oo.vashi@enterprisedb.com> wrote:
Hi Victoria,

Thanks for reviewing the patch.
The tests were failing due= to the latest commit #2b4605a9d390cb44e5dfe9967c3adf2b28d04f1f=C2=A0 = - Ensure backup/restore/maintenance work via SSH tunnels. Fixes #3355
=

I have fixed the issues and attached the updated patch.=

Thanks,
Khushboo=C2=A0

On Thu, May = 31, 2018 at 10:00 PM, Victoria Henry <vhenry@pivotal.io> wro= te:
H= i there,

We've been noticing some issues with the te= sts on both our CI and local Mac workstations.
  1. When the following code blocks are invoked -= we get plenty of app.context() issues. It must not= be valid when running tests.
=E2=80=8B
=
from pgadmin.utils.driver import get_driver
driver =3D get_driver(P= G_DEFAULT_DRIVER)
manager =3D driver.connection_manager(self.sid)

host =3D manager.local_b= ind_host if manager.use_ssh_tu= nnel else s.host
port =3D m= anager.local_bind_port if mana= ger.use_ssh_tunnel else s.port= =C2=A0
2. When we finally enable=C2=A0
"def=
ault_binary_paths": {
in our test_config, we get more failing tests that look= like:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=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.tools.restore.tests.test_restore_create_job_uni=
t_test.RestoreCreateJobTest)
When restore object with option - Miscellaneous
-----------------------------------------------------------------=
-----
Traceback (most recent call last):
  File "/Users/pivotal/.pyenv/versions/3.6.5/lib/python3.6/unitte=
st/mock.py", line 1179, in patched
    return func(*args, **keywargs)
  File "/Users/pivotal/workspace/pgadmin4/web/pgadmin/tools/resto=
re/tests/test_restore_create_job_unit_test.py", line 295, in=
 runTest
    self.assertEquals(response.status_code, 200)
AssertionError: 410 !=3D 200

And

Whe=
n restore object with the sections options ... 2018-05-31 12:24:42,988: ERR=
OR    pgadmin:    illegal environment variable name
Traceback (most recent call last):
  File "/Users/pivotal/workspace/pgadmin4/web/pgadmin/tools/resto=
re/__init__.py", line 352, in create_restore_job
    manager.export_password_env(p=
.id)
  File "/Users/pivotal/workspace/pgadmin4/web/pgadmin/utils/drive=
r/psycopg2/server_manager.py", line 365, in export_password_env
    os.environ[str(env)] =3D password
  File "/Users/pivotal/.pyenv/versions/3.6.5/lib/python3.6/os.py&=
quot;, line 675, in __setitem__
    self.putenv(key, value)
ValueError: illegal environment variable name
FAIL
=E2= =80=8B

Sincerely,

<= /div>
Victoria && Anthony

O= n Thu, May 31, 2018 at 1:16 AM Khushboo Vashi <khushboo.vashi@enterprisedb.com> wrote:
Hi,

Please find the attached updat= ed patch with the fixes.
The test cases were only failing on MAC = not on Linux.

Thanks,
Khushboo

On Wed, May 30,= 2018 at 10:13 AM, Khushboo Vashi <khushboo.vashi@enterprise= db.com> wrote:


On Wed, May 30, 2018 at 1:05 AM, Dave Page <dpage@p= gadmin.org> wrote:
Hi

On Mon, May 28, 2018 at 8:09 AM, Khushboo Vashi <khushboo.vashi@enterprisedb.com> wrote:
<= /span>
Hi= ,

please find the attached updated patch for the t= est cases of Backup, Restore and Maintenance modules which includes:
<= span>

1. Unit test cases
2. End to end regression t= est cases=C2=A0
3. Feature test cases
<= /blockquote>

Thanks. I've yet to be able to run the = feature tests successfully. Here's what I've found so far:

1) DEFAULT_BINARY_PATHS should be default_binary_paths in = the JSON config file.

Will do.=C2=A0
<= div dir=3D"ltr">
=
2) I've hit screensize related issues:

<= div>

=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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= .feature_tests.pg_utilities_maintenance_test.PGUtilitiesMaintenan= ceFeatureTest)

Test for PG maintenance= : database

-----------------------= -----------------------------------------------

Traceback (most recent = call last):

=C2=A0 File "/Users/dpage/g= it/pgadmin4/web/pgadmin/feature_tests/pg_utilities_maintenance_te= st.py", line 56, in runTest

=C2=A0 =C2=A0 self._open_mainten= ance_dialogue()

=C2=A0 File "/Users/dpage/g= it/pgadmin4/web/pgadmin/feature_tests/pg_utilities_maintenance_te= st.py", line 75, in _open_maintenance_dialogue

=C2=A0 =C2=A0 "*[.=3D'&= quot; + self.table_name + "']/../*[@class=3D'aciTreeItem'&= quot;

=C2=A0 File "/Users/dpage/.= virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriv= er/remote/webelement.py", line 80, in click

=C2=A0 =C2=A0 self._execute(Comm= and.CLICK_ELEMENT)

=C2=A0 File "/Users/dpage/.= virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriv= er/remote/webelement.py", line 628, in _execute

=C2=A0 =C2=A0 return self._paren= t.execute(command, params)

=C2=A0 File "/Users/dpage/.= virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriv= er/remote/webdriver.py", line 312, in execute

=C2=A0 =C2=A0 self.error_handler= .check_response(response)

=C2=A0 File "/Users/dpage/.= virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriv= er/remote/errorhandler.py", line 242, in check_response

=C2=A0 =C2=A0 raise exception_cl= ass(message, screen, stacktrace)

WebDriverException: Mes= sage: unknown error: Element <span class=3D"aciTreeItem">..= .</span> is not clickable at point (223, 604). Other element would re= ceive the click: <div class=3D"wcFrameCenter wcPanelBackground wcSc= rollableX wcScrollableY" style=3D"left: 0px; right: 0px; bottom: = 0px;">...</div>

=C2=A0 (Session info: chrome=3D6= 6.0.3359.181)

=C2=A0 (Driver info: chromedrive= r=3D2.38.552518 (183d19265345f54ce39cbb94cf81ba5f15905011),platform=3D= Mac OS X 10.12.6 x86_64)


3) One time the test did start, but then I saw this failure:=

=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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= .feature_tests.pg_utilities_backup_restore_test.PGUtilitiesBackup= FeatureTest)

Test for PG utilities -= Backup and Restore

-----------------------= -----------------------------------------------

Traceback (most recent = call last):

=C2=A0 File "/Users/dpage/g= it/pgadmin4/web/pgadmin/feature_tests/pg_utilities_backup_restore= _test.py", line 93, in runTest

=C2=A0 =C2=A0 self.page.fill_inp= ut_by_field_name("file", "test_backup_file")

=C2=A0 File "/Users/dpage/g= it/pgadmin4/web/regression/feature_utils/pgadmin_page.py", l= ine 211, in fill_input_by_field_name

=C2=A0 =C2=A0 self.wait_for_inpu= t_field_content(field_name, field_content)

=C2=A0 File "/Users/dpage/g= it/pgadmin4/web/regression/feature_utils/pgadmin_page.py", l= ine 251, in wait_for_input_field_content

=C2=A0 =C2=A0 "field to con= tain '" + str(content) + "'", input_field_has_conten= t

=C2=A0 File "/Users/dpage/g= it/pgadmin4/web/regression/feature_utils/pgadmin_page.py", l= ine 337, in _wait_for

=C2=A0 =C2=A0 "Timed out wa= iting for " + waiting_for_message

=C2=A0 File "/Users/dpage/.= virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriv= er/support/wait.py", line 80, in until

=C2=A0 =C2=A0 raise TimeoutExcep= tion(message, screen, stacktrace)

TimeoutException: Messa= ge: Timed out waiting for field to contain 'test_backup_file'

=


(with screenshot attached)

Thanks.<= /div>

I have ran the feature tests with multiple servers man= y times but didn't get a single failure.
I have asked Akshay = to run on his machine, let see what he gets.


<= div>=C2=A0

Thanks,
Khushboo



On Wed, Apr 25, 2018 at 9:40 PM, Joao De Almeida Pereira <jdealmeidapereira@pivotal.io> wrote:
Hi Khushboo,

=
We reviewed the patch and it is very nice to see some more cover= age in this area. Good job :D

We passed the tests = through our CI the feature tests are not passing, but the linter fails:
./pgadmin/feature_= tests/pg_utilities_backup_test.py:37: [E501] line too long (91 > 79= characters)
./pgadmin/feature_tests/pg_utilities_backup_test.py:53: [E501] = line too long (104 > 79 characters)
./pgadmin/feature_tests/pg_utilities_backup_test.py:59: [E501] = line too long (85 > 79 characters)
./pgadmin/feature_tests/pg_utilities_backup_test.py:62: [E501] = line too long (96 > 79 characters)
./pgadmin/feature_tests/pg_utilities_backup_test.py:63: [E501] = line too long (91 > 79 characters)
./pgadmin/feature_tests/pg_utilities_backup_test.py:70: [E501] = line too long (118 > 79 characters)
./pgadmin/tools/backup/tests/test_backup_message.py:37: [E121] = continuation line under-indented for hanging indent
./pgadmin/tools/backup/tests/test_backup_message.py:48: [E122] = continuation line missing indentation or outdented
./pgadmin/tools/backup/tests/test_backup_message.py:49: [E251] = unexpected spaces around keyword / parameter equals
./pgadmin/tools/backup/tests/test_backup_message.py:49: [E251] = unexpected spaces around keyword / parameter equals
./pgadmin/tools/backup/tests/test_backup_message.py:51: [E501] = line too long (91 > 79 characters)
./pgadmin/tools/backup/tests/test_backup_message.py:52: [E501] = line too long (94 > 79 characters)
./pgadmin/tools/backup/tests/test_backup_message.py:53: [E501] = line too long (108 > 79 characters)
./pgadmin/tools/backup/tests/test_backup_message.py:81: [E501] = line too long (113 > 79 characters)
./pgadmin/tools/backup/tests/test_backup_message.py:82: [E501] = line too long (94 > 79 characters)
./pgadmin/tools/backup/tests/test_backup_message.py:83: [E501] = line too long (108 > 79 characters)
./pgadmin/tools/backup/tests/test_backup_message.py:111: [E501]= line too long (100 > 79 characters)
./pgadmin/tools/backup/tests/test_backup_message.py:113: [E501]= line too long (94 > 79 characters)
./pgadmin/tools/backup/tests/test_backup_message.py:114: [E501]= line too long (108 > 79 characters)
./pgadmin/tools/backup/tests/test_backup_message.py:147: [E501]= line too long (93 > 79 characters)
./pgadmin/tools/backup/tests/test_batch_process.py:40: [E121] c= ontinuation line under-indented for hanging indent
./pgadmin/tools/backup/tests/test_batch_process.py:51: [E122] c= ontinuation line missing indentation or outdented
./pgadmin/tools/backup/tests/test_batch_process.py:135: [E501] = line too long (80 > 79 characters)
./pgadmin/tools/backup/tests/test_batch_process.py:137: [E501] = line too long (83 > 79 characters)
./pgadmin/tools/backup/tests/test_batch_process.py:138: [E122] = continuation line missing indentation or outdented
./pgadmin/tools/backup/tests/test_batch_process.py:139: [E122] = continuation line missing indentation or outdented
./pgadmin/tools/backup/tests/test_batch_process.py:140: [E122] = continuation line missing indentation or outdented
./pgadmin/tools/backup/tests/test_batch_process.py:191: [E501] = line too long (81 > 79 characters)
./pgadmin/tools/backup/tests/test_batch_process.py:203: [E501] = line too long (80 > 79 characters)
./pgadmin/tools/backup/tests/test_batch_process.py:204: [E128] = continuation line under-indented for visual indent
./pgadmin/tools/backup/tests/test_batch_process.py:204: [E501] = line too long (94 > 79 characters)
./pgadmin/tools/backup/tests/test_batch_process.py:205: [E128] = continuation line under-indented for visual indent
./pgadmin/tools/backup/tests/test_batch_process.py:205: [E501] = line too long (94 > 79 characters)
./pgadmin/tools/backup/tests/test_batch_process.py:216: [W391] = blank line at end of file
./pgadmin/tools/backup/tests/test_create_backup_job.py:296: [E5= 01] line too long (97 > 79 characters)
./pgadmin/tools/backup/tests/test_create_backup_job.py:317: [E3= 03] too many blank lines (2)
./pgadmin/tools/backup/tests/test_create_backup_job.py:336: [E5= 01] line too long (84 > 79 characters)
./pgadmin/tools/backup/tests/test_create_backup_job.py:371: [W3= 91] blank line at end of file
2 E121 continuation line under-indented for hanging indent
5 E122 continuation line missing indentation or outdented
2 E128 continuation line under-indented for visual indent
2 E251 unexpected spaces around keyword / parameter equals
1 E303 too many blank lines (2)
24 E501 line too long (91 > 79 characters)
2 W391 blank line at end of file
38

For the feature = tests, we realized we had to update the configuration, and we did that, but= we get the following error attached. We spent some time trying to understa= nd the problem but we were not successful.


Codewise:
- We just found some One Letter Variables in th= e code...
- Looks like there is a bug report in this area of the = code and we do not have coverage for it:=C2=A0https://redmine.postgresql= .org/issues/3232
=C2=A0 Looks like in some of the unit tests = we only have happy path tests, maybe we should see if there are any sad pat= hs that also need coverage.

The configuration chan= ge, maybe need to be updated. When we install multiple versions of postgres= the binaries live in `/usr/lib/postgresql/{{db_version}}/bin`, which = makes us think that this configuration should live near the server configur= ation, maybe? Also to maintain coherency on the naming maybe we should make= it all lower case.
Just as an aside, you can add the gpdb config= uration as well in you patch.

Thanks
Vic= toria & Joao

On Wed, Apr 25, 2018= at 5:20 AM Khushboo Vashi <khushboo.vashi@enterprisedb.com> wrote= :
Hi,

Please find the attached patch which covers test = cases for the backup module (RM #3206).

1. Unit te= st cases
2. End to end regression test cases=C2=A0
3. F= eature test cases

Thanks,
Khushboo
=

=






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

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

--000000000000528caa056df69244--