Author | Message |
---|---|
dguhath
Posts: 61
|
Posted 21:59 Jan 23, 2015 |
Hello Dr Sun, I have a quick question for you on the db setup video. Is there any particular reason why you created the database from console? Also I had to give the user superuser privileges for the test cases to execute. Else I was getting an unauthorized error. Am I missing something here? Also we don't need to save the test related files in svn right? Thanks. Last edited by dguhath at
22:11 Jan 23, 2015.
|
cysun
Posts: 2935
|
Posted 11:12 Jan 24, 2015 |
1. To me using console is often faster than using GUI. 2. You need to be aware of the ownership of a database and the ownership of the schema elements (e.g. tables) in a database. For example, suppose you log in PostgreSQL as the superuser postgres and created a user cs520 and a database cs520. If you try to access the database cs520 as the user cs520, you'll get an access error because the owner of the database is postgres. You need to change the owner to cs520, or set the owner to cs520 when you create the database (e.g. Another common mistake is to create the user, the database, and the tables under the database all as postgres, and then later try to access data as the user cs520. Even after changing the database owner to cs520, you'd still get access errors because the tables still belong to postgres. 3. "test related files" like SQL scripts, test cases and so on should be version controlled. Remember "test" is a phase in a build just like "compile" or "package". |
dguhath
Posts: 61
|
Posted 15:50 Jan 24, 2015 |
Thanks Dr. Sun, That helps. On the user permissions. Will creating a database with an owner( On the testing related files. I was speaking about the test results, Default suite, or even the individual test reports. I believe these don't need to exist in the repo. Right? The scripts & test cases surely will be part of the repo. Thanks. Last edited by dguhath at
15:56 Jan 24, 2015.
|
cysun
Posts: 2935
|
Posted 22:57 Jan 24, 2015 |
Yes, but just for that one database.
Right. Test results, reports etc. shouldn't be version controlled. |