Commit Graph

279 Commits

Author SHA1 Message Date
Rafa de la Torre
9dba6fa7c4 Merge pull request #175 from CartoDB/155-fix-wrong-delimiters
Removes extra d in delimiter 155
2015-11-24 15:58:54 +01:00
Javier Goizueta
f14fc057e2 Add optional parameter for max. great circle segment length 2015-11-23 17:13:17 +01:00
Javier Goizueta
1b8ced22a5 Fix name of expected results file 2015-11-23 16:57:34 +01:00
Javier Goizueta
a0ca2288f4 Fix: Cartodbfication failed with existing PK
This fixes #174
When a unique index and a primary key contraint existed for a column
named cartodb_id cartodbfy tried to add another PK constraint
2015-11-20 12:56:52 +01:00
Javier Goizueta
ea9503bd32 Allow dots in column names to be cartodbfied
This fixes #6144 of cartodb
2015-11-20 12:24:46 +01:00
Stuart Lynn
f43d1cc3c4 Merge branch 'master' into great_circle_generator 2015-11-18 15:36:51 +00:00
Guido Fioravantti
4803abf365 Fix typo in expected 155 2015-11-06 16:32:56 +01:00
Guido Fioravantti
cce63f0eae Adds ::integer cast for USING 155 2015-11-06 16:26:03 +01:00
Guido Fioravantti
7cf0d02935 Fixes expected 155 2015-11-06 15:11:08 +01:00
Guido Fioravantti
545196811f Changes logger level to error 155 2015-11-06 14:41:12 +01:00
Guido Fioravantti
6252907de2 Rises verbosity level before tests for _CDB_create_cartodb_id_column 155 2015-11-05 17:11:27 +01:00
Guido Fioravantti
081ed36aae Fixes NULL max in rec 155 2015-11-02 11:47:14 +01:00
Guido Fioravantti
453b3af872 Removes extra d in delimiter 155 2015-10-30 17:49:27 +01:00
Guido Fioravantti
bb54eb83c1 Drops CDB_Trim_Octets for CDB_Octet_Truncate 2015-10-26 18:01:03 +01:00
Guido Fioravantti
89f5987f53 Fix CDB_HelperTest_expect 173 2015-10-26 12:02:54 +01:00
Guido Fioravantti
cf8c5e5a33 Fixes CDB_HelperTest_expect 173 2015-10-23 12:11:40 +02:00
Guido Fioravantti
9850399693 Adds test for CDB_Unique_Column_Identifier 173 2015-10-22 19:23:38 +02:00
Guido Fioravantti
d14436da6c Renames test file 173 2015-10-22 17:14:13 +02:00
Guido Fioravantti
974f7f9899 Fixes tests 173 2015-10-22 17:08:23 +02:00
Guido Fioravantti
8479c3375b Adds CDB_Unique_Column_Identifier for columns 173 2015-10-22 17:01:47 +02:00
Guido Fioravantti
0d1ba2538b Adds test for new CDB_Helper 173 2015-10-22 16:18:46 +02:00
Stuart Lynn
66249843e8 making some text lowercase 2015-10-14 12:12:12 -04:00
Stuart Lynn
eb475fe55f Adding function to produce a great circle between two points. 2015-10-14 11:36:48 -04:00
Rafa de la Torre
15dd4935d6 Merge pull request #168 from CartoDB/148-cartodbfy-checks-for-null-cartodb-id
148 cartodbfy checks for null cartodb id
2015-10-06 14:39:00 +02:00
Guido Fioravantti
6b3b28f01f Makes CDB_DateToNumber() tests more intuitive 2202 2015-10-05 14:56:45 +02:00
Guido Fioravantti
186ed34ee5 Overloads CDB_DateToNumber() and adds test 2015-10-05 13:32:03 +02:00
Guido Fioravantti
5de395a4a8 Uses CDB_CartodbfyTableCheck() 148 2015-09-29 19:01:30 +02:00
Guido Fioravantti
777e8c6e4c Adds test to check cartodbfy works with null cartodb_id 2015-09-29 18:03:20 +02:00
Juan Ignacio Sánchez Lara
458cbf2a80 Merge branch 'master' into 103-Extension_Group_API 2015-09-21 12:21:58 +02:00
Rafa de la Torre
c8e3cf5500 Add test courtesy of Paul #154 2015-09-16 12:17:35 +02:00
Rafa de la Torre
d268497030 Add expectation for new test #141 2015-09-15 19:14:06 +02:00
Rafa de la Torre
9d8d79eb40 Slightly improve the test #141 2015-09-14 17:55:30 +02:00
Rafa de la Torre
e546c15770 Test for failing scenario #141 2015-09-11 16:16:54 +02:00
Rafa de la Torre
85b206fdba Improve test about existing cartodb_id values #138 2015-09-10 18:18:13 +02:00
Rafa de la Torre
75b37d5a88 Improve tests #138 2015-09-09 18:34:55 +02:00
Rafa de la Torre
497034c285 Add test for failing scenario #138 2015-09-09 18:33:06 +02:00
Rafa de la Torre
6e4a5b5635 Add CASCADE to DROP SCHEMA... in tear_down #138 2015-09-09 18:33:06 +02:00
Raul Ochoa
1853ee6306 Do not use random() for the distribution to test CDB_Stats functions
Fixes #144
2015-09-09 17:08:32 +02:00
Juan Ignacio Sánchez Lara
f70fd1a4c7 Merge branch 'master' into 103-Extension_Group_API 2015-09-07 13:37:21 +02:00
Raul Ochoa
5abe6e0b3d Merge branch 'master' into cdb_querytables_quoted
Conflicts:
	test/extension/test.sh
2015-09-07 12:17:36 +02:00
Raul Ochoa
1eabc5e880 Merge pull request #131 from CartoDB/column-regclass-functions
Column regclass
2015-09-07 12:11:59 +02:00
Raul Ochoa
c6cdaea626 Merge pull request #124 from CartoDB/add-kurtosis
Add kurtosis and skewness
2015-09-07 12:11:34 +02:00
Juan Ignacio Sánchez Lara
4405ecb466 Multiple users test 2015-09-07 11:43:57 +02:00
Juan Ignacio Sánchez Lara
59d144d91d Batch add/remove users support 2015-09-07 10:35:04 +02:00
Juan Ignacio Sánchez Lara
428a2391ad Refactor Member -> User 2015-09-07 09:56:59 +02:00
Andy Eschbacher
b5a9fb9fcf Merge branch 'add-kurtosis' of https://github.com/CartoDB/cartodb-postgresql into add-kurtosis 2015-09-03 22:44:06 -04:00
Andy Eschbacher
83b7f47617 removing raise notices and lower test bounds 2015-09-03 22:43:25 -04:00
Raul Ochoa
25cf48d4a4 Raise min message so we don't have to validate notices 2015-09-04 00:02:30 +02:00
Raul Ochoa
4be7d4a497 Use quote_ident to quote schema and table names when necessary
Fixes #133
2015-09-03 13:12:29 +02:00
Raul Ochoa
350c76f847 Add option to run tests by prefix
`bash test/extension/test.sh test_cdb_querytables`
will run all tests that start with test_cdb_querytables
2015-09-03 12:59:20 +02:00
Andy Eschbacher
d00e71309d really add tests 2015-09-02 22:35:03 -04:00
Andy Eschbacher
07280321ab adding tests 2015-09-02 22:19:07 -04:00
Raul Ochoa
e28b6344aa Assert it's not possible to get column names from a table without permissions 2015-09-02 12:32:43 +02:00
Raul Ochoa
2867a6fbad Assert user can use its schema to retrieve column names 2015-09-02 12:32:34 +02:00
Raul Ochoa
7582f2cbc5 CDB_ColumnType uses schema and table from regclass
Fixes #130
2015-09-02 12:06:04 +02:00
Raul Ochoa
4b5c5dd275 CDB_ColumnNames uses schema and table name from regclass
Fixes #122
2015-09-02 12:04:52 +02:00
Raul Ochoa
eb6fc4fefb Use CDB_ColumnType and CDB_ColumnNames in bash tests 2015-09-02 12:01:43 +02:00
Juan Ignacio Sánchez Lara
a003ab7f6a Merge branch 'master' into 103-Extension_Group_API 2015-08-31 13:27:21 +02:00
Rafa de la Torre
0057e2ddec Fix for index generation when renaming table #123 2015-08-27 16:33:46 +02:00
Rafa de la Torre
79cacb8ef4 Modify sampling of table quota trigger #126 2015-08-27 12:52:30 +02:00
Paul Ramsey
8c2252a9cb Handle text 'the_geom' columns as desired in #117 2015-08-21 13:10:05 -07:00
Juan Ignacio Sánchez Lara
a885f5328e Fix conf tests (json values) 2015-08-20 10:45:24 +02:00
Juan Ignacio Sánchez Lara
e1d195a21f Merge branch 'master' into 103-Extension_Group_API 2015-08-19 18:51:37 +02:00
Juan Ignacio Sánchez Lara
a75a337296 _CDB_Conf_Cache SD-based 2015-08-18 10:44:10 +02:00
Juan Ignacio Sánchez Lara
d6410d91bd Cache http client 2015-08-18 08:24:30 +02:00
Rafa de la Torre
53754236e3 Fix for quota test after merge with master
Now cartodbfyied tables take less space because of the timestamp
columns.
2015-08-17 15:56:48 +02:00
Rafa de la Torre
2b48f90374 Merge remote-tracking branch 'origin/master' into new_cartodbfy
Conflicts:
	test/CDB_QuotaTest.sql
2015-08-17 15:27:33 +02:00
Rafa de la Torre
565edcb50d Make cartodbfy return destoid 2015-08-14 16:53:43 +02:00
Juan Ignacio Sánchez Lara
e11f4ef169 Group name validation delegated to role creation 2015-08-14 15:40:36 +02:00
Juan Ignacio Sánchez Lara
db89bf1a94 Grant select on configuration table to org members 2015-08-14 15:28:19 +02:00
Juan Ignacio Sánchez Lara
d4bcb97f9b CDB_CONF and create and drop group api calls 2015-08-14 14:00:58 +02:00
Juan Ignacio Sánchez Lara
7262d34b06 IMMUTABLE-STABLE-VOLATILE specification 2015-08-14 14:00:58 +02:00
Juan Ignacio Sánchez Lara
3ee4978240 Roles simplification, without md5 and prepending database name 2015-08-14 14:00:57 +02:00
Juan Ignacio Sánchez Lara
2ece2979a6 Drop cartodb schema before dropping publicuser 2015-08-14 14:00:57 +02:00
Juan Ignacio Sánchez Lara
401d3e9066 publicuser back 2015-08-14 14:00:57 +02:00
Juan Ignacio Sánchez Lara
79e1926766 Group management done by organization admin 2015-08-14 14:00:57 +02:00
Juan Ignacio Sánchez Lara
e2dd1e014e test_valid_group_names and test_not_valid_group_names 2015-08-14 14:00:57 +02:00
Juan Ignacio Sánchez Lara
1915e28a0f Cleaner debug output 2015-08-14 14:00:57 +02:00
Juan Ignacio Sánchez Lara
bd46796bb7 Fix spacing 2015-08-14 14:00:57 +02:00
Juan Ignacio Sánchez Lara
898d3c14fd test_group_management_functions_cant_be_used_by_normal_members and warning -> error processing 2015-08-14 14:00:57 +02:00
Juan Ignacio Sánchez Lara
c29733eb87 publicuser uncommenting 2015-08-14 14:00:26 +02:00
Juan Ignacio Sánchez Lara
52f73b1a01 CDB_Group_Table_GrantReadWrite 2015-08-14 14:00:26 +02:00
Juan Ignacio Sánchez Lara
e04f0caa6c Permission granting 2015-08-14 14:00:25 +02:00
Juan Ignacio Sánchez Lara
5afdd77dcf Rename group 2015-08-14 14:00:25 +02:00
Juan Ignacio Sánchez Lara
42e72ac9d5 cartodb.CDB_Group_CreateGroup cartodb.CDB_Group_DropGroup 2015-08-14 13:58:10 +02:00
Rafa de la Torre
900531f0c1 Disable a couple of tests
Comment out tests that check cartodb_id text columns. These are no
longer taken into consideration as candidate primary ID (candidate
columns should be numeric).
2015-08-14 13:46:01 +02:00
Rafa de la Torre
010dd13e4d Simple fix for type cheking in test 2015-08-14 13:40:10 +02:00
Rafa de la Torre
72ebc398f8 Recover _CDB_check_prerequisites (sorry, my fault) 2015-08-14 12:30:01 +02:00
Paul Ramsey
d268cd07cb Fix many tests and handle ownership issues involved
with Cartodbfy being invoked by schema triggers. Some
issues with regclass interpretation in tests still remain.
Some issues with slightly different behavior to old version
remain. Some issues with error messages / notification messages
changing a little still remain.
2015-08-13 15:59:45 -07:00
Raul Ochoa
219d876973 Merge pull request #110 from CartoDB/issue-108
Fixes CDB_UserDataSize failing due `ERROR: relation "*" does not exist.`
2015-08-13 19:01:05 +02:00
Raul Ochoa
e959bba335 Validates it's enought to grant publicuser to user.
Reference to PR where it will be actually fixed for now.
2015-08-13 18:53:41 +02:00
Raul Ochoa
4e31d3a37e Fixes CDB_UserDataSize failing due ERROR: relation "*" does not exist.
Adds new _CDB_total_relation_size function that handles nonexistent
tables and does fallback to size=0.

That function could be used to cache total relation size or query another
table view with a cached total relation size.

Fixes #108
2015-08-13 13:23:35 +02:00
Rafa de la Torre
8a031f56f5 Recover test for cartodb_id not-null constraint 2015-08-12 15:58:30 +00:00
Rafa de la Torre
6b9ab3d956 Fix quota test
Now the cartodbfied table is a bit smaller because it does not have the
timestamp columns.
2015-08-12 10:26:37 +02:00
Raul Ochoa
14213c5d6a Test scenario to show how public tables can be accessed by other roles
This will require changes in cartodb/cartodb rails app because user/role
creation happens over there. So it's not possible to fix all the problems
within the extension right now.
2015-08-12 10:10:21 +02:00
Rafa de la Torre
c11d1bbf50 Fix CDB_CartodbfyTableTest
by removing references to created_at and updated_at columns
2015-08-11 19:52:37 +02:00
javi
513488da0e change random value for quota test again 2015-07-28 09:05:03 +02:00
javi
189a73ce4d fixed tests 2015-07-27 16:12:15 +02:00
javi
400248cd5d remove connection permissions to public user 2015-07-27 11:20:55 +02:00
javi
92b5d1f8f4 creating in setup 2015-07-27 11:15:14 +02:00
javi
68fdd9ce33 just add login permissions to public user 2015-07-27 11:07:46 +02:00
javi
53e6b38c32 enabling user again (no sense) 2015-07-27 11:03:21 +02:00
javi
c71faf21e2 do not create publicuser since a previous tests is doing it 2015-07-27 10:57:38 +02:00
javi
12260b9fc3 test cleanup 2015-07-27 10:54:43 +02:00
javi
1b3db28a74 added tests for organization 2015-07-27 10:51:20 +02:00
javi
5d6c2111bf updates tests 2015-07-27 10:37:07 +02:00
javi
e05613d5c4 added tests for usertables to check private tables are not returned 2015-07-27 10:25:44 +02:00
Paul Ramsey
011a007f04 Return test results in deterministic order (closes #96) 2015-07-07 06:13:02 -07:00
Paul Ramsey
734561de4c Use 'publicuser' as public role, not 'public', closes #95.
This is consistent with cartodb behaviour, but not exactly
the same as the contract that the 'public' role guarantees
access to public resources. Possibly a better fix would be
to audit (ug) everything and make sure that it's really
using the public role to mean public, rather than the
'publicuser' connection role. That CDB creates.
2015-07-07 05:49:28 -07:00
Raul Ochoa
8190edb461 Merge pull request #83 from CartoDB/64-usertables
Replace CDB_UserTables with something that can handle multi-user accounts
2015-06-30 11:33:32 +02:00
Andy Eschbacher
e5897f3dad Merge pull request #87 from CartoDB/categ-distrib
Function deciding criteria for using a category column in a map
2015-06-25 11:50:56 -04:00
Andy Eschbacher
b9fe204007 Merge pull request #81 from CartoDB/equalint
adding equal interval function for consistency
2015-06-25 11:08:24 -04:00
Andy Eschbacher
13946b4d47 update test output 2015-06-25 08:17:41 -04:00
Rafa de la Torre
c3eea08f66 Remove ECHO from expectation #86
Remove the `\set ECHO none` from expectation that is automatically
removed by the test harness but still appears in the output when a test
fails.
2015-06-24 16:29:40 +02:00
Rafa de la Torre
22fc962d09 Change expectation #86
Just add CONTEXT lines since they are now added in case of
WARNING/ERROR as a result of having CDB_QueryTables calling
CDB_QueryTablesText.
2015-06-24 16:01:45 +02:00
Andy Eschbacher
3ad3038c5e fixed symlink path, other minor items 2015-06-23 18:32:16 -04:00
Andy Eschbacher
f8542af57a add tests 2015-06-23 18:07:48 -04:00
Andy Eschbacher
9cb1fe30d8 adding tests 2015-06-08 15:01:50 -04:00
Paul Ramsey
dd3f125339 Fix test expectation 2015-06-01 11:10:06 -07:00
Paul Ramsey
e7ef5e7e8e Clean up after tests
For #64
2015-06-01 10:57:30 -07:00
Andy Eschbacher
42a617e79c ugh bad filename 2015-05-19 16:03:54 -04:00
Andy Eschbacher
bf4a31842b new result 2015-05-19 15:50:34 -04:00
Andy Eschbacher
737dc1c1f1 updated formating of test 2015-05-18 12:12:55 -04:00
Andy Eschbacher
d0c85855f5 fixed test expectation value 2015-05-18 12:00:42 -04:00
Andy Eschbacher
ee1df92561 fixed precision in tests 2015-05-14 15:45:57 -04:00
Andy Eschbacher
16d0dc739a added tests improved func 2015-05-14 15:32:58 -04:00
Andy Eschbacher
d9e254dbd5 missed updating value 2015-04-28 10:21:34 -04:00
Andy Eschbacher
7d0efa95fb updated test 2015-04-28 09:59:57 -04:00
Raul Ochoa
fc95566ddd Remove test for unexistent table as there was already one 2015-03-31 16:01:49 +02:00
Raul Ochoa
7f58e1f690 Adds tests for cdb_tablemetadatatouch
- fixes tableoid by using the proper table oid
 - tests quoted and unqouted call with OID
 - tests non existent table to fail
2015-03-31 14:48:45 +02:00
Raul Ochoa
38d32371c8 Adds test to validate CDB_TableMetadataTouch usage with OID 2015-03-03 12:09:25 +01:00
Kartones
9114d4e463 #revert-size_calc Stop this madness 2015-02-27 11:08:19 +01:00
Kartones
5db9dc6a9f #revert-size_calc 3KB diff at expected result 2015-02-27 10:58:13 +01:00
Kartones
0a3d08edc3 #revert-size_calc 2015-02-27 10:53:14 +01:00
Raul Ochoa
f16f53ceab Adds test for non-authorized writes to cdb_tablemetadata through CDB_TableMetadataTouch 2015-02-19 14:02:27 +01:00
Raul Ochoa
27aec0d4b4 Adds tests for qualified table names 2015-02-18 18:01:29 +01:00
Raul Ochoa
da7b3b7080 Adds CDB_TableMetadataTouch function to be able to upsert updated_at
value in cdb_tablemetadata
2015-02-18 17:08:46 +01:00
Kartones
6c7706672f #69 now using pg_relation_size 2015-02-17 15:40:26 +01:00
javi
0223d00a54 fixed security problem 2015-02-12 10:57:12 +01:00
Kartones
61b47617b8 #1138 fixes for specs 2014-11-18 17:35:11 +01:00
Kartones
3b5c1f65cb #1138 Quota changes, raster import cartodbfication and quota spec 2014-11-18 15:24:54 +01:00
Kartones
f251e12d35 CDB-4418 2014-10-21 16:19:44 +02:00
javi
723a08e814 added CDB_Math_mode 2014-08-19 18:09:27 +02:00
Raul Ochoa
5bb638b995 Merge pull request #45 from CartoDB/CDB-3743
CDB_QueryTables returns only results for schemas associated to Relation-Names
2014-08-01 18:14:53 +02:00
Raul Ochoa
2637742c2e CDB-3743 Makes CDB_QueryTables to return only results for schemas associated to Relation-Names 2014-08-01 18:06:06 +02:00
Kartones
679af1d4a3 CDB-3497 Finished stabilizing specs 2014-07-28 17:53:19 +02:00
Raul Ochoa
2bd0b223a6 CDB_SetUserQuotaInBytes returning set value instead of previous value. 2014-07-07 10:36:51 +02:00
Kartones
3c5251e6c6 CDB-3303 Cartodbfication also supporting optional schemas 2014-07-04 15:55:08 +02:00
javi
77182321ff added delete permission with write permission for organization 2014-06-26 15:50:56 +02:00
Raul Ochoa
b98419aeb8 Merge remote-tracking branch 'rambo/cdb_querytables_support_schemas' into CDB-3094 2014-06-26 08:12:41 +02:00