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 1fPr9F-0001Lt-7F for pgadmin-hackers@arkaria.postgresql.org; Mon, 04 Jun 2018 15:11:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fPr9D-00074z-FW for pgadmin-hackers@arkaria.postgresql.org; Mon, 04 Jun 2018 15:11:51 +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 1fPr9B-00074o-Sx for pgadmin-hackers@lists.postgresql.org; Mon, 04 Jun 2018 15:11:51 +0000 Received: from mx0b-00296801.pphosted.com ([148.163.153.148]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fPr96-00017Y-2P for pgadmin-hackers@postgresql.org; Mon, 04 Jun 2018 15:11:47 +0000 Received: from pps.filterd (m0114585.ppops.net [127.0.0.1]) by mx0b-00296801.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w54FBM81011019 for ; Mon, 4 Jun 2018 15:11:40 GMT Received: from mail-it0-f69.google.com (mail-it0-f69.google.com [209.85.214.69]) by mx0b-00296801.pphosted.com with ESMTP id 2jbkd527ww-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Mon, 04 Jun 2018 15:11:39 +0000 Received: by mail-it0-f69.google.com with SMTP id i9-v6so949625itb.8 for ; Mon, 04 Jun 2018 08:11:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XFPzVoug6bLI42mAlt0eCdjfAS1BPZAqAaJF7YxCACo=; b=bgdUbBl1bTdVVHU6USwKrISjXIw2gD1zA9/gAmuL5TkUZDueHng56y7stcNP3KhKRJ +3XVcfhEuEoc0LUczlcL2hCJHD4b2EiPuDrtxuy8hm+59zZPpZHrgGgHwrXVuENuUySg Mg4enVVqb5x8f9guiBetengIMILwUJtUT490aRQEtG+mA2V+/xQ2R+X2znhAVfWeVdju i1XRcSRnTJXDUKcR7Cg8tycjIif64orXNGINc3dYaqW6dMl9F5NOHmCAOYpNkAu/HwY4 BnX1GqWFaYpk7JCi1nW7SA1uXxOvdb+pvKlnEz23iA/Lgvcmwp1dy3A5ykMCFGO/0xU5 6z/g== X-Gm-Message-State: APt69E2EqwmzywZsGEzkPq00SJs445kR7254TsTZou9MRAU5yvwyM8a5 fYFTbGIQkxMofQN07kHM6eOsaNYQsQPAT/5BJmTI6tKSfbBKdYAV+px18r7PElNLk3Uzl5FB1DP rFetRz85qyH5s/mkiHvKA084M7caYlUUfjwfxgPKVIxLUmKBFawZR4W2a4trlaS+iXvXe X-Received: by 2002:a24:19c2:: with SMTP id b185-v6mr1929553itb.147.1528125098656; Mon, 04 Jun 2018 08:11:38 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJd05kFxiCQSv4cMnFaJTEhXfcae5ZIyzi+hkZct+GFyYB+GRqTytR6hoKyr9a0EzRCIxIq7IEOGmbXxHZamq4= X-Received: by 2002:a24:19c2:: with SMTP id b185-v6mr1929520itb.147.1528125098269; Mon, 04 Jun 2018 08:11:38 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Joao De Almeida Pereira Date: Mon, 4 Jun 2018 11:11:01 -0400 Message-ID: Subject: Re: [pgadmin4][Patch]: Test cases for the backup module To: Khushboo Vashi Cc: Dave Page , Victoria Henry , pgadmin-hackers Content-Type: multipart/alternative; boundary="000000000000a7c25e056dd25968" X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-06-04_11:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=10 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806040179 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --000000000000a7c25e056dd25968 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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": "" } 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 >>> wrote: >>> >>>> Hi there, >>>> >>>> We've been noticing some issues with the tests on both our CI and loca= l >>>> 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 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/unittest/mo= ck.py", line 1179, in patched >>>> return func(*args, **keywargs) >>>> File "/Users/pivotal/workspace/pgadmin4/web/pgadmin/tools/restore/te= sts/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-31 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/psy= copg2/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", lin= e 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 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 in 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_utilities_maintenance_test.PGUtilitiesMai= ntenanceFeatureTest) >>>>>>> >>>>>>> Test for PG maintenance: database >>>>>>> >>>>>>> >>>>>>> -------------------------------------------------------------------= --- >>>>>>> >>>>>>> Traceback (most recent call last): >>>>>>> >>>>>>> File >>>>>>> "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/pg_utilities_m= aintenance_test.py", >>>>>>> line 56, in runTest >>>>>>> >>>>>>> self._open_maintenance_dialogue() >>>>>>> >>>>>>> File >>>>>>> "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/pg_utilities_m= aintenance_test.py", >>>>>>> line 75, in _open_maintenance_dialogue >>>>>>> >>>>>>> "*[.=3D'" + self.table_name + "']/../*[@class=3D'aciTreeItem'" >>>>>>> >>>>>>> File >>>>>>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/sel= enium/webdriver/remote/webelement.py", >>>>>>> line 80, in click >>>>>>> >>>>>>> self._execute(Command.CLICK_ELEMENT) >>>>>>> >>>>>>> File >>>>>>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/sel= enium/webdriver/remote/webelement.py", >>>>>>> line 628, in _execute >>>>>>> >>>>>>> return self._parent.execute(command, params) >>>>>>> >>>>>>> File >>>>>>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/sel= enium/webdriver/remote/webdriver.py", >>>>>>> line 312, in execute >>>>>>> >>>>>>> self.error_handler.check_response(response) >>>>>>> >>>>>>> File >>>>>>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/sel= enium/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 point (223, 60= 4). 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=3DMac OS X 10.1= 2.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.PGUtilities= BackupFeatureTest) >>>>>>> >>>>>>> Test for PG utilities - Backup and Restore >>>>>>> >>>>>>> >>>>>>> -------------------------------------------------------------------= --- >>>>>>> >>>>>>> Traceback (most recent call last): >>>>>>> >>>>>>> File >>>>>>> "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/pg_utilities_b= ackup_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_pag= e.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_pag= e.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_pag= e.py", >>>>>>> line 337, in _wait_for >>>>>>> >>>>>>> "Timed out waiting for " + waiting_for_message >>>>>>> >>>>>>> File >>>>>>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/sel= enium/webdriver/support/wait.py", >>>>>>> line 80, in until >>>>>>> >>>>>>> raise TimeoutException(message, screen, stacktrace) >>>>>>> >>>>>>> TimeoutException: Message: Timed out waiting for field to 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 he gets. >>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>>> >>>>>>>> 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 >>>>>>>>> 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] li= ne too long (91 > 79 characters) >>>>>>>>> >>>>>>>>> ./pgadmin/feature_tests/pg_utilities_backup_test.py:53: [E501] li= ne too long (104 > 79 characters) >>>>>>>>> >>>>>>>>> ./pgadmin/feature_tests/pg_utilities_backup_test.py:59: [E501] li= ne too long (85 > 79 characters) >>>>>>>>> >>>>>>>>> ./pgadmin/feature_tests/pg_utilities_backup_test.py:62: [E501] li= ne too long (96 > 79 characters) >>>>>>>>> >>>>>>>>> ./pgadmin/feature_tests/pg_utilities_backup_test.py:63: [E501] li= ne too long (91 > 79 characters) >>>>>>>>> >>>>>>>>> ./pgadmin/feature_tests/pg_utilities_backup_test.py:70: [E501] li= ne too long (118 > 79 characters) >>>>>>>>> >>>>>>>>> ./pgadmin/tools/backup/tests/test_backup_message.py:37: [E121] co= ntinuation line under-indented for hanging indent >>>>>>>>> >>>>>>>>> ./pgadmin/tools/backup/tests/test_backup_message.py:48: [E122] co= ntinuation line missing indentation or outdented >>>>>>>>> >>>>>>>>> ./pgadmin/tools/backup/tests/test_backup_message.py:49: [E251] un= expected spaces around keyword / parameter equals >>>>>>>>> >>>>>>>>> ./pgadmin/tools/backup/tests/test_backup_message.py:49: [E251] un= expected spaces around keyword / parameter equals >>>>>>>>> >>>>>>>>> ./pgadmin/tools/backup/tests/test_backup_message.py:51: [E501] li= ne too long (91 > 79 characters) >>>>>>>>> >>>>>>>>> ./pgadmin/tools/backup/tests/test_backup_message.py:52: [E501] li= ne too long (94 > 79 characters) >>>>>>>>> >>>>>>>>> ./pgadmin/tools/backup/tests/test_backup_message.py:53: [E501] li= ne too long (108 > 79 characters) >>>>>>>>> >>>>>>>>> ./pgadmin/tools/backup/tests/test_backup_message.py:81: [E501] li= ne too long (113 > 79 characters) >>>>>>>>> >>>>>>>>> ./pgadmin/tools/backup/tests/test_backup_message.py:82: [E501] li= ne too long (94 > 79 characters) >>>>>>>>> >>>>>>>>> ./pgadmin/tools/backup/tests/test_backup_message.py:83: [E501] li= ne too long (108 > 79 characters) >>>>>>>>> >>>>>>>>> ./pgadmin/tools/backup/tests/test_backup_message.py:111: [E501] l= ine too long (100 > 79 characters) >>>>>>>>> >>>>>>>>> ./pgadmin/tools/backup/tests/test_backup_message.py:113: [E501] l= ine too long (94 > 79 characters) >>>>>>>>> >>>>>>>>> ./pgadmin/tools/backup/tests/test_backup_message.py:114: [E501] l= ine too long (108 > 79 characters) >>>>>>>>> >>>>>>>>> ./pgadmin/tools/backup/tests/test_backup_message.py:147: [E501] l= ine too long (93 > 79 characters) >>>>>>>>> >>>>>>>>> ./pgadmin/tools/backup/tests/test_batch_process.py:40: [E121] con= tinuation line under-indented for hanging indent >>>>>>>>> >>>>>>>>> ./pgadmin/tools/backup/tests/test_batch_process.py:51: [E122] con= tinuation line missing indentation or outdented >>>>>>>>> >>>>>>>>> ./pgadmin/tools/backup/tests/test_batch_process.py:135: [E501] li= ne too long (80 > 79 characters) >>>>>>>>> >>>>>>>>> ./pgadmin/tools/backup/tests/test_batch_process.py:137: [E501] li= ne too long (83 > 79 characters) >>>>>>>>> >>>>>>>>> ./pgadmin/tools/backup/tests/test_batch_process.py:138: [E122] co= ntinuation line missing indentation or outdented >>>>>>>>> >>>>>>>>> ./pgadmin/tools/backup/tests/test_batch_process.py:139: [E122] co= ntinuation line missing indentation or outdented >>>>>>>>> >>>>>>>>> ./pgadmin/tools/backup/tests/test_batch_process.py:140: [E122] co= ntinuation line missing indentation or outdented >>>>>>>>> >>>>>>>>> ./pgadmin/tools/backup/tests/test_batch_process.py:191: [E501] li= ne too long (81 > 79 characters) >>>>>>>>> >>>>>>>>> ./pgadmin/tools/backup/tests/test_batch_process.py:203: [E501] li= ne too long (80 > 79 characters) >>>>>>>>> >>>>>>>>> ./pgadmin/tools/backup/tests/test_batch_process.py:204: [E128] co= ntinuation line under-indented for visual indent >>>>>>>>> >>>>>>>>> ./pgadmin/tools/backup/tests/test_batch_process.py:204: [E501] li= ne too long (94 > 79 characters) >>>>>>>>> >>>>>>>>> ./pgadmin/tools/backup/tests/test_batch_process.py:205: [E128] co= ntinuation line under-indented for visual indent >>>>>>>>> >>>>>>>>> ./pgadmin/tools/backup/tests/test_batch_process.py:205: [E501] li= ne too long (94 > 79 characters) >>>>>>>>> >>>>>>>>> ./pgadmin/tools/backup/tests/test_batch_process.py:216: [W391] bl= ank 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 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 at= tached. We >>>>>>>>> spent some time trying to understand the problem but we 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 w= e >>>>>>>>> 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 n= eed >>>>>>>>> coverage. >>>>>>>>> >>>>>>>>> The configuration change, 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 th= at this >>>>>>>>> configuration should live near the server configuration, maybe? A= lso to >>>>>>>>> maintain coherency on the naming maybe we should make it all lowe= r case. >>>>>>>>> Just as an aside, you can add the gpdb configuration as 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 cases 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 >>>>>>> >>>>>> >>>>>> >>>>> >>> >> >> >> -- >> Dave Page >> Blog: http://pgsnake.blogspot.com >> Twitter: @pgsnake >> >> EnterpriseDB UK: http://www.enterprisedb.com >> The Enterprise PostgreSQL Company >> > > --000000000000a7c25e056dd25968 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Khushboo,

Some tests are failing in = greenplum:
The piece of code responsible for the error is:
if server[&#=
39;default_binary_paths'] =
is not None:
test_utils.set_preference(server['default_binary_paths'])

c= onfig.DEFAULT_BINARY_PATHS =3D {
"pg": str(server['default_binary_paths= ']['pg']),
"ppas&= quot;: str(server['default_binary_paths']['ppas']),
= "gpdb": = ""
}

<= code style=3D"font-size:0.85em;font-family:Consolas,Inconsolata,Courier,mon= ospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px = solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;= display:inline">test_backup_utils.py file name is misleading, these = are not tests, are helpers.

=E2=80=8B
=


Thanks
Victoria &a= mp; 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 Pag= e <dpage@pgadmin.org> wrote:
Hi

This looks good, except that it&#= 39;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 <khushboo.vash= i@enterprisedb.com> wrote:
=
Hi Victoria,

Thanks for reviewing the p= atch.
The tests were failing due to the latest commit #2b4605a9d3= 90cb44e5dfe9967c3adf2b28d04f1f=C2=A0 - Ensure backup/restore/maintenance wo= rk via SSH tunnels. Fixes #3355

I have fixed the i= ssues and attached the updated patch.

Thanks,
Khushboo=C2=A0

On Thu, M= ay 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_DR= IVER)
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_bin= d_port if manager.use_ssh_tunn= el else s.port=C2=A0
2. When we finally enable=C2=A0
"default_binary_path=
s": {
<= div>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_unit_tes=
t.RestoreCreateJobTest)
When restore object with option - Miscellaneous
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/pivotal/.pyenv/versions/3.6.5/lib/python3.6/unittest/mo=
ck.py", line 1179, in patched
    return func(*args, **keywargs)
  File "/Users/pivotal/workspace/pgadmin4/web/pgadmin/tools/restore/te=
sts/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-31 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/psy=
copg2/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,

Vi= ctoria && Anthony

On Thu, May 31, 2018 at 1:16 AM Khushboo Vashi = <kh= ushboo.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, Ma= y 30, 2018 at 10:13 AM, Khushboo Vashi <khushboo.vashi@enter= prisedb.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 pat= ch for the test cases of Backup, Restore and Maintenance modules which incl= udes:

1. Unit test cases
2. End to end = regression test cases=C2=A0
3. Feature test cases

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

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

Will do.=C2=A0
2) I've h= it 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_utilities_mainte= nance_test.PGUtilitiesMaintenanceFeatureTest)

Test for PG maintenance: database

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

Traceback (most recent call last):

=C2=A0 F= ile "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/pg_utilities_= maintenance_test.py", line 56, in runTest

=C2=A0 =C2=A0 <= /span>self._open_maintenance_dialogue()

=C2=A0 F= ile "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/pg_utilities_= maintenance_test.py", line 75, in _open_maintenance_dialogue

=C2=A0 =C2=A0 <= /span>"*[.=3D'" + self.table_name + "']/../*[@class= =3D'aciTreeItem'"

=C2=A0 F= ile "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/se= lenium/webdriver/remote/webelement.py", line 80, in click

=C2=A0 =C2=A0 <= /span>self._execute(Command.CLICK_ELEMENT)

=C2=A0 F= ile "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/se= lenium/webdriver/remote/webelement.py", line 628, in _execute

=C2=A0 =C2=A0 <= /span>return self._parent.execute(command, params)

=C2=A0 F= ile "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/se= lenium/webdriver/remote/webdriver.py", line 312, in execute

=C2=A0 =C2=A0 <= /span>self.error_handler.check_response(response)

=C2=A0 F= ile "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/se= lenium/webdriver/remote/errorhandler.py", line 242, in check_response<= /span>

=C2=A0 =C2=A0 <= /span>raise exception_class(message, screen, stacktrace)

WebDriverException: Message: unknown error: Element <s= pan class=3D"aciTreeItem">...</span> is not clickable at= point (223, 604). Other element would receive the click: <div class=3D&= quot;wcFrameCenter wcPanelBackground wcScrollableX wcScrollableY" styl= e=3D"left: 0px; right: 0px; bottom: 0px;">...</div>

=C2=A0 (= Session info: chrome=3D66.0.3359.181)

=C2=A0 (= Driver info: chromedriver=3D2.38.552518 (183d19265345f54ce39cbb94cf81ba5f15= 905011),platform=3DMac 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.PGUtilitiesBackupFeatureTest)

Test for PG utilities - Backup and Restore

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

Traceback (most recent call last):

=C2=A0 F= ile "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/pg_utilities_= backup_restore_test.py", line 93, in runTest

=C2=A0 =C2=A0 <= /span>self.page.fill_input_by_field_name("file", "test_backu= p_file")

=C2=A0 F= ile "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_pa= ge.py", line 211, in fill_input_by_field_name

=C2=A0 =C2=A0 <= /span>self.wait_for_input_field_content(field_name, field_content)

=C2=A0 F= ile "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_pa= ge.py", line 251, in wait_for_input_field_content

=C2=A0 =C2=A0 <= /span>"field to contain '" + str(content) + "'"= , input_field_has_content

=C2=A0 F= ile "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_pa= ge.py", line 337, in _wait_for

=C2=A0 =C2=A0 <= /span>"Timed out waiting for " + waiting_for_message

=C2=A0 F= ile "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/se= lenium/webdriver/support/wait.py", line 80, in until

=C2=A0 =C2=A0 <= /span>raise TimeoutException(message, screen, stacktrace)

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



(with screenshot attached)

Thanks.<= /div>

<= div>I have ran the feature tests with multiple servers many times but didn&= #39;t get a single failure.
I have asked Akshay to run on his mac= hine, let see what he gets.


=C2=A0

Thanks,
Khushboo



<= /div>

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 = coverage in this area. Good job :D

We passed the t= ests through our CI the feature tests are not passing, but the linter fails= :
./pgadmin/feature_tests/pg_utilities_backup_tes= t.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 unde= r-indented for hanging indent
./pgadmin/= tools/backup/tests/test_backup_message.py:48: [E122] continuation line miss= ing indentation or outdented
./pgadmin/= tools/backup/tests/test_backup_message.py:49: [E251] unexpected spaces arou= nd keyword / parameter equals
./pgadmin/= tools/backup/tests/test_backup_message.py:49: [E251] unexpected spaces arou= nd 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 &g= t; 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 &g= t; 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] continuation line under= -indented for hanging indent
./pgadmin/= tools/backup/tests/test_batch_process.py:51: [E122] continuation line missi= ng 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 miss= ing indentation or outdented
./pgadmin/= tools/backup/tests/test_batch_process.py:139: [E122] continuation line miss= ing indentation or outdented
./pgadmin/= tools/backup/tests/test_batch_process.py:140: [E122] continuation line miss= ing 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 unde= r-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 unde= r-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 f= ile
./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 lin= es (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 E1= 21 continuation line under-indented for hanging indent
5 E1= 22 continuation line missing indentation or outdented
2 E1= 28 continuation line under-indented for visual indent
2 E2= 51 unexpected spaces around keyword / parameter equals
1 E3= 03 too many blank lines (2)
24 E5= 01 line too long (91 > 79 characters)
2 W3= 91 blank line at end of file
38

For the feature tests, we realize= d we had to update the configuration, and we did that, but we get the follo= wing error attached. We spent some time trying to understand the problem bu= t we 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 no= t 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 pat= h tests, maybe we should see if there are any sad paths that also need cove= rage.

The configuration change, maybe need to be u= pdated. When we install multiple versions of postgres the binaries live in = `/usr/lib/postgresql/{{db_version}}/bin`, which makes us think that this co= nfiguration should live near the server configuration, maybe? Also to maint= ain coherency on the naming maybe we should make it all lower case.
Just as an aside, you can add the gpdb configuration as well in you patc= h.

Thanks
Victoria & Joao
=

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

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

1. = Unit test cases
2. End to end regression test cases=C2=A0
3. Feature test cases

Thanks,
Khushbo= o




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

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






--
=
Dave Page
Blog: http://pgsnake.blogspot.com
Twit= ter: @pgsnake

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

--000000000000a7c25e056dd25968--