citus/src/test/regress
SaitTalhaNisanci d99deab7d9
Add upgrade postgres version test (#2940)
* Add creating a citus cluster script

Creating a citus cluster is automated.
Before running this script:
- Citus should be installed and its control file should be added to postgres. (make install)
- Postgres should be installed.

* Initialize upgrade test table and fill

* Finalize the layout of upgrade tests

Postgres upgrade function is added.
The newly added UDFs(citus_prepare_pg_upgrade, citus_finish_pg_upgrade) are used to
perform upgrade.

* Refactor upgrade test and add config file

* Add schedules for upgrade testing

* Use pg_regress for upgrade tests

pg_regress is used for creating a simple distributed table in
upgrade tests. After upgrading another schedule is used to verify
that the distributed table exists. Router and realtime queries are
used for verifying.

* Run upgrade tests as a postgres user in a temp dir

postgres user is used for psql to be consistent at running tests.
A temp dir is created and the temp dir's permissions are changed so
that postgres user can access it. All psql commands are now run with
postgres user.

"Select * from t" query is changed as "Select * from t order by a"
so that the result is always in the same order.

* Add docopt and arguments for the upgrade script

Docopt dependency is added to parse flags in script.
Some refactoring in variable names is done.

* Add readme for upgrade tests

* Refactor upgrade tests

Use relative data path instead of absolute assuming that this script will
always be run from 'src/test/regress'
Remove 'citus-path' flag
Use specific version for docopt instead of *
Use named args in string formatting

* Resolve a security problem

Instead of using string formatting in subprocess.call, arguments
list is used. Otherwise users could do shell injection.
Shell = True is removed from subprocess call as it is not recommended
to use this.

* Add how the test works to readme

* Refactor some variables to be consistent

* Update upgrade script based on the reviews

It was possible that postgres server would stay running even when the script
crashes, atexit library is used to ensure that we always do a teardown where we stop
the databases.

Some formatting is done in the code for better readability.

Config class is used instead of a dictonary.

A target for upgrade test is added to makefile.

Unused flags/functions/variables are removed.

* Format commands and remove unnecessary flag from readme
2019-09-10 17:56:04 +03:00
..
bin Refactor Ensure Schema Exists to Ensure Dependecies Exists (#2882) 2019-09-04 14:10:20 +02:00
data Add hyperscale tutorial to the regression tests. 2019-07-10 10:47:55 +02:00
expected Add upgrade postgres version test (#2940) 2019-09-10 17:56:04 +03:00
input multi_colocation_utils: sort by nodeport, not placementid 2019-07-25 14:33:43 +00:00
mitmscripts Fix misc typos 2019-05-23 17:23:27 -07:00
output multi_colocation_utils: sort by nodeport, not placementid 2019-07-25 14:33:43 +00:00
specs Remove early escape in walking pg_depend (#2930) 2019-09-05 18:03:34 +02:00
sql Add upgrade postgres version test (#2940) 2019-09-10 17:56:04 +03:00
upgrade Add upgrade postgres version test (#2940) 2019-09-10 17:56:04 +03:00
.gitignore Add upgrade postgres version test (#2940) 2019-09-10 17:56:04 +03:00
Makefile Add upgrade postgres version test (#2940) 2019-09-10 17:56:04 +03:00
Pipfile Add upgrade postgres version test (#2940) 2019-09-10 17:56:04 +03:00
Pipfile.lock Add upgrade postgres version test (#2940) 2019-09-10 17:56:04 +03:00
after_upgrade_schedule Add upgrade postgres version test (#2940) 2019-09-10 17:56:04 +03:00
base_schedule Propagate more ALTER FOREIGN TABLE to workers 2019-05-24 12:54:05 -07:00
before_upgrade_schedule Add upgrade postgres version test (#2940) 2019-09-10 17:56:04 +03:00
failure_base_schedule Implementation for asycn FinishConnectionListEstablishment (#2584) 2019-03-22 17:30:42 +01:00
failure_schedule Introduce the adaptive executor (#2798) 2019-06-28 14:04:40 +02:00
isolation_schedule Refactor Ensure Schema Exists to Ensure Dependecies Exists (#2882) 2019-09-04 14:10:20 +02:00
log_test_times Add test-timing script 2019-02-26 23:01:40 -07:00
multi_follower_schedule Allow simple DML commands from hot standby 2018-10-06 10:54:44 +02:00
multi_mx_schedule Support TRUNCATE from the MX worker nodes 2018-09-03 14:06:31 +03:00
multi_schedule Create a test 'pg12' for pg12 features & error on unsupported new features 2019-08-22 19:30:56 +00:00
multi_task_tracker_extra_schedule Remove create_insert_proxy_for_table 2019-03-15 14:13:03 -06:00
pg_regress_multi.pl Remove normalized_tests.lst, don't normalize check-vanilla 2019-09-03 17:25:00 +00:00
worker_schedule Initial commit of Citus 5.0 2016-02-11 04:05:32 +02:00