Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bUsHR-0003jN-Tp for pgadmin-hackers@arkaria.postgresql.org; Wed, 03 Aug 2016 09:16:02 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bUsHQ-0004w4-Px for pgadmin-hackers@arkaria.postgresql.org; Wed, 03 Aug 2016 09:16:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bUsHQ-0004vx-AM for pgadmin-hackers@postgresql.org; Wed, 03 Aug 2016 09:16:00 +0000 Received: from mail-it0-x232.google.com ([2607:f8b0:4001:c0b::232]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bUsHH-0007im-Cs for pgadmin-hackers@postgresql.org; Wed, 03 Aug 2016 09:15:59 +0000 Received: by mail-it0-x232.google.com with SMTP id u186so293312553ita.0 for ; Wed, 03 Aug 2016 02:15:50 -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:content-transfer-encoding; bh=TfYTHJ8PTkuULXWNESg5ffqrIM+VFOmPuS1/8OIPShU=; b=HaEg4j4/gddLUeNlN+QzAo3L9WSzyde3fJoG8lRrjupP8UQoUsAT2salHVFxYMVb/C H9xI6t8Shxnj47ac+xwkFoij5/u7KIs+mEDUwenUL3jcX4WS/d/h6QG1w05of3vq1xCS g0NaqBPho+QW7sWmFOGslZZwtqLeZbBFEJQ/VvJSrO0bmOhtzcPYSy0d6RJmjIXxZv+a oM9IYt0AY/7xXCT/lWAo2cmetaS5GjGmHy6FmzgaQMqVY8HfMRb7AoWi8uvPg01kho8r OH+u+Au6tLbu5fJzU2Wd63gTZsmJ3Kac6jDMWq7QELLxqh0BCfPxUAZ005baRnxabVbF rzPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=TfYTHJ8PTkuULXWNESg5ffqrIM+VFOmPuS1/8OIPShU=; b=HfFxaT8OOEKYPyVt0KhDfnub8YRekjC36xi2H3TArlYD9qy90k37Fq99Xe2FYERhjI JFJ+f1gfHMhNbh8iubgQenvFebW0aQ+xMyMXI3RJunquFHzUuzFdd6sJEVh2nGEdDRLX AnB+5P/SsUE6Pw3jHAhL0hVM4ltYd/v7iH5dBqJ0N+JkR8ZHh8dCy0mLESuhtgWiE8/R a5B1MhwqKjWgBj2ujNZ6p5nwP2EBAWl1b5G/6+AT9S/UYcpdsafL60CyAc/+ZGGqGNJ2 yqmp5EaBnKQ6nuZADMNpM3rvlijBv9agrJLmfbUxtRc17FJBsKNsJjE3g24XhTRvBmCK r9Eg== X-Gm-Message-State: AEkooutPORxCs1VUVqMk5zEHvHq/XNu6rG6aOFlSE4LYLYO8g3eygl1NTo3NJhnZ0jpYUP7+qabMeBFrcxY1CALkQ2jzQIUtBhHjrWqKyl4gI+or6r+vbQFxEKL69l+Qo3+acFznrhl/Ka/WSHYh16m+r83s+oypZnwgZc77EnwkfVBWa+PxvTe+XFlfj3q6+/Ci9txtFw== X-Received: by 10.36.14.140 with SMTP id 134mr24133028ite.98.1470215748908; Wed, 03 Aug 2016 02:15:48 -0700 (PDT) Received: from mail-it0-f45.google.com (mail-it0-f45.google.com. [209.85.214.45]) by smtp.gmail.com with ESMTPSA id f9sm4629768itc.10.2016.08.03.02.15.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Aug 2016 02:15:47 -0700 (PDT) Received: by mail-it0-f45.google.com with SMTP id f6so225658232ith.0 for ; Wed, 03 Aug 2016 02:15:47 -0700 (PDT) X-Received: by 10.36.103.214 with SMTP id u205mr24351090itc.88.1470215747042; Wed, 03 Aug 2016 02:15:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.208.97 with HTTP; Wed, 3 Aug 2016 02:15:46 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Wed, 3 Aug 2016 10:15:46 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: pgAdmin IV : Unittest modular patch To: Navnath Gadakh Cc: pgadmin-hackers , Kanchan Mohitey Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org Hi Navnath On Tue, Aug 2, 2016 at 3:58 PM, Navnath Gadakh wrote: > Hi Dave, > Please find the attached patch. > This patch includes: > 1. API test cases for Roles & Tablespaces node(Completed nodes: server > groups, servers, databases) > You can run test-suite using following command > for roles node > python regression/runtests.py --pkg > browser.server_groups.servers.roles > for tablespaces node > python regression/runtests.py --pkg > browser.server_groups.servers.tablespaces > for all nodes > python regression/runtests.py > You can also test with multiple servers. > 2. Delete database code in some of the missed test files. > 3. Added advanced configurations in test_advanced_config.json.in for role= s & > tablespaces. So, accordingly you need change the file > test_advanced_config.json > 4. Added one test user credentials in test_config.json.in to test the =E2= =80=98valid > password=E2=80=99 test case which is present in > browser/tests/test_change_password.py > Why test user credentials in test_config.json.in? > Currently, I am getting =E2=80=98UnicodeDecodeError=E2=80=99 w= hen I run > test-suite(runtests.py) with existing code. I already explained the detail > about this error in RM(#1521). I am creating test user to test the =E2=80= =98valid > password=E2=80=99 test case. The tablespace test is one that I think is going to cause us problems - we really can't have a hard-coded path in the config; - It might need to be different for each server being tested - It is very likely to be different for each user I think what we need to do is: - Skip the tests if the server is not connected via a Unix domain socket (hostname starts with /), 127.0.0.1 or ::1. - Add per-server configuration options for the tablespace path and service account under which the database server runs. These values should default to /tmp and postgres for a PostgreSQL server, and edb for PPAS. - Otherwise; assume the server is on the local machine, and: - Create /$tblspace_path// - chown $service_account /$tblspace_path// - Run the tests Thoughts? I'd also suggest another couple of changes: - Remove the test_ prefix from the values in the config files. It doesn't really help in the code as there you'll always have the data in a variable anyway, e.g. adv_config_data["spc_location"] instead of adv_config_data["test_spc_location"]. - I think we should fall back to using test_advanced_config.json.in if the user hasn't made their own copy, e.g. try: with open(CURRENT_PATH + '/test_advanced_config.json') as data_file: advanced_config_data =3D json.load(data_file) except: with open(CURRENT_PATH + '/test_advanced_config.json.in') as data_file: advanced_config_data =3D json.load(data_file) --=20 Dave Page VP, Chief Architect, Tools & Installers EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company Blog: http://pgsnake.blogspot.com Twitter: @pgsnake --=20 Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers