Thread: [pgAdmin4][patch] In SharedServersGetTestCase, the prompt information is wrong

[pgAdmin4][patch] In SharedServersGetTestCase, the prompt information is wrong

From
"zhangjie2@fujitsu.com"
Date:
Hi, all

SharedServersGetTestCase can only be tested in SERVER mode.
So, in Desktop mode, prompt information will be output.
However, the prompt is wrong.  
("Can not run shared servers test cases in the SERVER mode.")

I think it should be changed to the following prompt information
"Can not run shared servers test cases in the Desktop mode."

----------------------------------------------------------------------------
file: web\pgadmin\browser\server_groups\servers\tests\test_shared_server.py

SharedServersGetTestCase

    def setUp(self):
        """This function add the server to test the GET API"""

        if config.SERVER_MODE is False:
            self.skipTest(
                "Can not run shared servers test cases in the SERVER mode."  ※
            )
----------------------------------------------------------------------------

Here is a patch for test_shared_server.py
Please review.

Best Regards!
Zhangjie




Attachment
Thanks, the patch applied.

On Thu, Jul 22, 2021 at 1:09 PM zhangjie2@fujitsu.com <zhangjie2@fujitsu.com> wrote:
Hi, all

SharedServersGetTestCase can only be tested in SERVER mode.
So, in Desktop mode, prompt information will be output.
However, the prompt is wrong. 
("Can not run shared servers test cases in the SERVER mode.")

I think it should be changed to the following prompt information
"Can not run shared servers test cases in the Desktop mode."

----------------------------------------------------------------------------
file: web\pgadmin\browser\server_groups\servers\tests\test_shared_server.py

SharedServersGetTestCase

    def setUp(self):
        """This function add the server to test the GET API"""

        if config.SERVER_MODE is False:
            self.skipTest(
                "Can not run shared servers test cases in the SERVER mode."  ※
            )
----------------------------------------------------------------------------

Here is a patch for test_shared_server.py
Please review.

Best Regards!
Zhangjie





--
Thanks & Regards
Akshay Joshi
pgAdmin Hacker | Principal Software Architect
EDB Postgres
Mobile: +91 976-788-8246