Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bHRNA-0005tW-Bl for pgadmin-hackers@arkaria.postgresql.org; Mon, 27 Jun 2016 07:54:24 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bHRN9-0002LG-35 for pgadmin-hackers@arkaria.postgresql.org; Mon, 27 Jun 2016 07:54:23 +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 1bHRMw-00027T-1f for pgadmin-hackers@postgresql.org; Mon, 27 Jun 2016 07:54:10 +0000 Received: from mail-io0-x22d.google.com ([2607:f8b0:4001:c06::22d]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bHRMs-0000Hp-GQ for pgadmin-hackers@postgresql.org; Mon, 27 Jun 2016 07:54:09 +0000 Received: by mail-io0-x22d.google.com with SMTP id s63so141846216ioi.3 for ; Mon, 27 Jun 2016 00:54:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=S0l7G7OTVE6an9ol7lyOyNCpaftdTXWLqzLZs94X2vk=; b=Ho+8wUZxzAI7VDYYHq6/adUpT4H3AAZv8vCxgo6PGZd9Y2wAtiM3L77VSmTGMhE3Lf tqO8fLyPzGXYMYinnCHNODPusAUBzMBWw+fjDB6YaEAa7Akv140WPgg3SDo0R1dGlBnK COkChNQPUEfuQt+l1Lh0YrnjMpKzYgUuD8sQlDUmk9QW1G+nihw6yJXZ0nIqYWlBPYRi dIAUwrNO2jV4uoxv8Uw5Z7NoOolPcR6apifWMRFTMTtVJGfZTDv2/1btOs+n8h76whvr bKYFp9SEflmP+UaS3tO1PHBgw6rpTyb1I1QE4pT5OAVPYtlKa04L1dfBerwlJpZeTg8T hOcg== 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; bh=S0l7G7OTVE6an9ol7lyOyNCpaftdTXWLqzLZs94X2vk=; b=U5Rn5bFS7ZOHN39KPILVWpUbO4AWkA7xM/OAKiJUw8t65NImlkLI52LJnabipg4MF1 x1QZLzC6lGOv83QGuuJ3NWHlSyKunDCrCSYcHrc0rx+X5j29lIbt1QuSu58uQehNq3md A2aBamSPDTStZnbNoxT25+Gb84hzngXanKOLDIpuxeTcFPn6NfNmvm0wrg6DxMQ43+d3 WWOlCNKhKhmlWaLR23tXTFIGH+qfwZZ/nUOLaboxmZGfwg+lo1/GbOpW/O0CFKo5hjNN 7E+XDL/5afU1uKLOA+nc5xYVtSVQ4KLWX4SS5jB3nRvVF1KfzcSgjTmEKyosib7PjcF7 3+bg== X-Gm-Message-State: ALyK8tIgl7rpbbUwTES8yWIVIGLYmsVVcuWsgKrYrM2MwM7HePZkx9hI3OprDX5XLEYgFp4Mz7kGEHM4U2QgMw== X-Received: by 10.107.3.84 with SMTP id 81mr14692608iod.156.1467014044168; Mon, 27 Jun 2016 00:54:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.24.233 with HTTP; Mon, 27 Jun 2016 00:54:03 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Mon, 27 Jun 2016 08:54:03 +0100 Message-ID: Subject: Re: pgAdmin IV API test cases patch To: Priyanka Shendge Cc: pgadmin-hackers , Kanchan Mohitey Content-Type: text/plain; charset=UTF-8 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 On Sun, Jun 26, 2016 at 12:05 PM, Priyanka Shendge wrote: > > > On 24 June 2016 at 16:17, Dave Page wrote: >> >> Hi >> >> On Thu, Jun 23, 2016 at 2:41 PM, Priyanka Shendge >> wrote: >> > >> > >> > On 15 June 2016 at 15:05, Priyanka Shendge >> > wrote: >> >> >> >> Thanks a lot Dave. >> >> >> >> On 15 June 2016 at 14:09, Dave Page wrote: >> >>> >> >>> Hi >> >>> >> >>> On Thu, Jun 9, 2016 at 1:37 PM, Priyanka Shendge >> >>> wrote: >> >>> > Hi Dave, >> >>> > >> >>> > PFA updated patch. I have made changes suggested by you. >> >>> > >> >>> > Kindly, review and let me know for more changes. >> >>> >> >>> OK, I got a bit further this time, but not there yet. >> >>> >> >>> 1) The patch overwrote my test_config.json file. That should never >> >>> happen (that file shouldn't be in the source tree). >> >>> test_config.json.in should be the file that's included in the patch. >> >> >> >> >> >> OK. >> >>> >> >>> >> >>> 2) The updated test_config.json file is huge. >> > >> > >> > Current configuration file web/regression/test_config.json contains test >> > data(credentials) for each tree node; >> > which is used while adding and updating the respective node. >> >> Why would we need that? > > > Each node file (e.g. test_db_add.py and test_db_put.py) uses respective > credentials from > test_config.json while execution. That doesn't answer my question - why do we need separate credentials for each node? >> We should have just one set of credentials for >> everything. > > > Let me know if my understanding is clear: > > Should i keep basic credentials of each node (database, schema) into > test_config.json > instead taking care of each field? You should have one set of credentials that's used for the entire test run. >> >>> I should only need to >> >>> define one or more connections, then be able to run the tests. If you >> >>> need to keep configuration info for "advanced users", let's put it in >> >>> a different file to avoid confusing/scaring everyone else. Maybe split >> >>> it into config.json for the stuff the user needs to edit >> >>> (config.json.in would go in git), and test_config.json for the test >> >>> configuration. >> > >> > >> > Should i keep login and server credentials into >> > web/regression/test_config.json file and >> > put respective node details into config.json file of respective node's >> > tests >> > directory? >> >> Not if you expect users to need to edit them - and if not, why are the >> values not just hard-coded? >> >> > e.g. for database node: >> > I'll create config.json file into .../databases/tests/ directory >> > put database add and update credentials into config.json >> >> The key here is to make it simple for users. >> >> - To run the default tests, they should be able to copy/edit a simple >> file, and just add database server details for the server to run >> against. >> >> - If we have configurable tests (because making them configurable adds >> genuine value), then we can use an "advanced" config file to allow the >> user to adjust settings as they want. >> >> In the simple case, the user should be able to run the tests >> successfully within a minute or two from starting. >> >> In designing the layout for files etc, remember the following: >> >> - Users should never edit a file that is in our source control. That's >> why we have .in files that we expect them to copy. >> >> - Unless they're an advanced user, they shouldn't need to copy the >> config file for advanced options. That means that the tests should >> have defaults that match what is in the template advanced config file >> (or, the tests could read advanced.json.in if advanced.json doesn't >> exist, though that does seem a little icky). Of course, those are >> example filenames, not necessarily what you may choose. >> >> -- >> Dave Page >> Blog: http://pgsnake.blogspot.com >> Twitter: @pgsnake >> >> EnterpriseDB UK: http://www.enterprisedb.com >> The Enterprise PostgreSQL Company > > > > > -- > Best, > Priyanka > > EnterpriseDB Corporation > The Enterprise PostgreSQL Company -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers