Re: fixes for browser.tests api test cases
Hi Hackers, I have fixed the issue related to 'pgadmin.browser.tests.test_ internal_version.InternalVersionTestCase' and made the part of current attached patch. Please review and commit the changes. @Dave The issue you highlighted related to total test case counts for feature tests, now onward I will work on that and will update you accordingly. On Wed, Oct 17, 2018 at 6:00 PM, Dave Page wrote: > > > On Wed, Oct 17, 2018 at 1:56 PM Usman Muzaffar < > usman.muzaf...@enterprisedb.com> wrote: > >> >> >> On Wed, Oct 17, 2018 at 4:02 PM, Dave Page wrote: >> >>> Hi >>> >>> On Tue, Oct 16, 2018 at 1:35 PM Usman Muzaffar < >>> usman.muzaf...@enterprisedb.com> wrote: >>> Hi Hackers, Please find here attached patch for the following test cases,(in package pgadmin.browser.tests) which were failing. - test_change_password - test_gravatar_image_display - test_login - test_logout - test_reset_password - test_version_in_range following fixes are provided - Overridden base class setUp function, as if there is any issue in the base class setup code, it fails the test case uselessly. - Changed 'active' parameter value to boolean from integer in following api '/user_management/user/' in the test case ,as the relevant post function accepts value in boolean. Currently due to this the test case was failing. Please review the patch and commit. Note: I have verified it on Python2.7 & Python3.6 >>> >>> That does fix most issues, however I still see this: >>> >> I was told someone was working on this therefore I did not work to avoid >> duplicate efforts. Currently, no one is working so I will pick and provide >> the fix. >> > > OK, thanks. > > >> >>> == >>> >>> FAIL: runTest (pgadmin.browser.tests.test_internal_version. >>> InternalVersionTestCase) >>> >>> TestCase with INTERNAL_VERSION_PARAM present >>> >>> -- >>> >>> Traceback (most recent call last): >>> >>> File >>> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/tests/test_internal_version.py", >>> line 60, in runTest >>> >>> self.assertTrue(url.endswith(version_string)) >>> >>> AssertionError: False is not true >>> >>> >>> -- >>> >>> Another issue of note is this seen when I try to run the feature tests. >>> Notice how the counts of tests don't add up? >>> >> Did you just run feature tests(python runtests.py --pkg feature_tests) ? >> Then I will have to see why 15 test cases are being skipped? I will update >> you accordingly. >> > > Well, "make check-feature", but that's the same thing. The point is not > that the tests were skipped (that's intentional), but that at the top it > says 16 were skipped (which I believe is correct), and at the bottom it > says 1 passed and 15 were skipped. > > >> >>> -- >>> >>> Ran 16 tests in 0.006s >>> >>> >>> OK (skipped=16) >>> >>> >>> == >>> >>> Test Result Summary >>> >>> == >>> >>> >>> Regression - PG 9.6: >>> >>> >>> 1 test passed >>> >>> 0 tests failed >>> >>> 15 tests skipped: >>> >>> BrowserToolBarFeatureTest (Browser tool bar feature test) >>> >>> CopySelectedQueryResultsFeatureTest (Copy rows, column using button and >>> keyboard shortcut) >>> >>> CheckFileManagerFeatureTest (File manager feature test) >>> >>> KeyboardShortcutFeatureTest (Test for keyboard shortcut) >>> >>> PGDataypeFeatureTest (Test checks for PG data-types output) >>> >>> PGUtilitiesBackupFeatureTest (Test for PG utilities - Backup and Restore) >>> >>> PGUtilitiesMaintenanceFeatureTest (Test for PG maintenance: database, >>> >>> Test for PG maintenance: table) >>> >>> QueryToolAutoCompleteFeatureTest (Query tool auto complete feature test) >>> >>> QueryToolJourneyTest (Tests the path through the query tool) >>> >>> QueryToolFeatureTest (Query tool feature test) >>> >>> TableDdlFeatureTest (Test table DDL generation) >>> >>> CheckForViewDataTest (Validate Insert, Update operations in View/Edit >>> data with given test data) >>> >>> CheckForXssFeatureTest (Test XSS check for panels and query tool) >>> >>> CheckDebuggerForXssFeatureTest (Tests to check if Debugger is vulnerable >>> to XSS) >>> >>> CheckRoleMembershipControlFeatureTest (Tests to check if Role >>> membership control is vulnerable to XSS) >>> >>> >>> == >>> >>> Thanks! >>> >>> -- >>> Dave Page >>> Blog: http://pgsnake.blogspot.com >>> Twitter: @pgsnake >>> >>> EnterpriseDB UK: http://www.enterprisedb.com >>> The Enterprise PostgreSQL Company >>>
pgAdmin 4 commit: Test case fixes for server mode.
Test case fixes for server mode. Branch -- master Details --- https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=9ae49cbf3167ad35be8dcba22742664ee6630959 Author: Usman Muzaffar Modified Files -- web/pgadmin/browser/tests/test_change_password.py| 6 +++--- web/pgadmin/browser/tests/test_gravatar_image_display.py | 4 web/pgadmin/browser/tests/test_internal_version.py | 11 +++ web/pgadmin/browser/tests/test_login.py | 4 web/pgadmin/browser/tests/test_logout.py | 4 web/pgadmin/browser/tests/test_reset_password.py | 4 web/pgadmin/browser/tests/test_version_in_range.py | 4 7 files changed, 30 insertions(+), 7 deletions(-)
Re: fixes for browser.tests api test cases
Thanks - patch applied. On Thu, Oct 18, 2018 at 9:17 AM Usman Muzaffar < usman.muzaf...@enterprisedb.com> wrote: > Hi Hackers, > > I have fixed the issue related to 'pgadmin.browser.tests.test_ > internal_version.InternalVersionTestCase' and made the part of current > attached patch. > > Please review and commit the changes. > > @Dave > The issue you highlighted related to total test case counts for feature > tests, now onward I will work on that and will update you accordingly. > > On Wed, Oct 17, 2018 at 6:00 PM, Dave Page wrote: > >> >> >> On Wed, Oct 17, 2018 at 1:56 PM Usman Muzaffar < >> usman.muzaf...@enterprisedb.com> wrote: >> >>> >>> >>> On Wed, Oct 17, 2018 at 4:02 PM, Dave Page wrote: >>> Hi On Tue, Oct 16, 2018 at 1:35 PM Usman Muzaffar < usman.muzaf...@enterprisedb.com> wrote: > Hi Hackers, > > Please find here attached patch for the following test cases,(in > package pgadmin.browser.tests) which were failing. > >- test_change_password >- test_gravatar_image_display >- test_login >- test_logout >- test_reset_password >- test_version_in_range > > > following fixes are provided > >- Overridden base class setUp function, as if there is any issue >in the base class setup code, it fails the test case uselessly. >- Changed 'active' parameter value to boolean from integer in >following api '/user_management/user/' > > in the test case ,as the relevant post function accepts value > in boolean. Currently due to this the test case was failing. > > > Please review the patch and commit. > > Note: I have verified it on Python2.7 & Python3.6 > That does fix most issues, however I still see this: >>> I was told someone was working on this therefore I did not work to avoid >>> duplicate efforts. Currently, no one is working so I will pick and provide >>> the fix. >>> >> >> OK, thanks. >> >> >>> == FAIL: runTest (pgadmin.browser.tests.test_internal_version.InternalVersionTestCase) TestCase with INTERNAL_VERSION_PARAM present -- Traceback (most recent call last): File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/tests/test_internal_version.py", line 60, in runTest self.assertTrue(url.endswith(version_string)) AssertionError: False is not true -- Another issue of note is this seen when I try to run the feature tests. Notice how the counts of tests don't add up? >>> Did you just run feature tests(python runtests.py --pkg feature_tests) ? >>> Then I will have to see why 15 test cases are being skipped? I will update >>> you accordingly. >>> >> >> Well, "make check-feature", but that's the same thing. The point is not >> that the tests were skipped (that's intentional), but that at the top it >> says 16 were skipped (which I believe is correct), and at the bottom it >> says 1 passed and 15 were skipped. >> >> >>> -- Ran 16 tests in 0.006s OK (skipped=16) == Test Result Summary == Regression - PG 9.6: 1 test passed 0 tests failed 15 tests skipped: BrowserToolBarFeatureTest (Browser tool bar feature test) CopySelectedQueryResultsFeatureTest (Copy rows, column using button and keyboard shortcut) CheckFileManagerFeatureTest (File manager feature test) KeyboardShortcutFeatureTest (Test for keyboard shortcut) PGDataypeFeatureTest (Test checks for PG data-types output) PGUtilitiesBackupFeatureTest (Test for PG utilities - Backup and Restore) PGUtilitiesMaintenanceFeatureTest (Test for PG maintenance: database, Test for PG maintenance: table) QueryToolAutoCompleteFeatureTest (Query tool auto complete feature test) QueryToolJourneyTest (Tests the path through the query tool) QueryToolFeatureTest (Query tool feature test) TableDdlFeatureTest (Test table DDL generation) CheckForViewDataTest (Validate Insert, Update operations in View/Edit data with given test data) CheckForXssFeatureTest (Test XSS check for panels and query tool) CheckDebuggerForXssFeatureTest (Tests to check if Debugger is vulnerable to XSS) CheckRoleMembershipControlFeatureTest (Tests to check if Role membership control is vulnera
pgAdmin 4 commit: Fixed issue where session files are not deleted first
Fixed issue where session files are not deleted first time when pgAdmin4 server started, it always wait for CHECK_SESSION_FILES_INTERVAL which is 24 hours by default. Branch -- master Details --- https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=370df4704287d9f0c3247b76230c3c7213573b50 Modified Files -- web/pgadmin/utils/session.py | 46 1 file changed, 25 insertions(+), 21 deletions(-)