forked from yugabyte/yugabyte-db
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: This diff fixed issues that @karthik found. - Added test suite. The tool cannot handle comparison for error messages yet. So if the test has error messages, the error messages are ignored. - Not disconnected every minute. - Disabled auto-connect when creating database. - Removed filenames from error messages. Test Plan: Run CQL & the new PGSQL test suite. Reviewers: mihnea, robert Reviewed By: robert Subscribers: mikhail, karthik, yql Differential Revision: https://phabricator.dev.yugabyte.com/D4672
- Loading branch information
Showing
21 changed files
with
652 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Copyright (c) YugaByte, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except | ||
# in compliance with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software distributed under the License | ||
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | ||
# or implied. See the License for the specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
|
||
add_library(pgsql_test pg_psql_test.cc) | ||
target_link_libraries(pgsql_test | ||
yb-pgsql | ||
yb_client | ||
yb_client_test_util | ||
integration-tests) | ||
add_dependencies(pgsql_test yb-pgserver) | ||
|
||
set(YB_TEST_LINK_LIBS pgsql_test ${YB_MIN_TEST_LIBS}) | ||
ADD_YB_TEST(pg_run_test) | ||
ADD_COMMON_YB_TEST_DEPENDENCIES(pg_run_test) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
CREATE DATABASE mytest_on_create_table; | ||
\c mytest_on_create_table; | ||
|
||
CREATE TABLE tab_without_key(id INT, name VARCHAR); | ||
|
||
CREATE TABLE tab_with_one_col_key(id INT PRIMARY KEY, name VARCHAR); | ||
|
||
CREATE TABLE tab_with_multi_col_key(id INT, | ||
name VARCHAR, | ||
salary DOUBLE PRECISION, primary key(id, name)); | ||
|
||
DROP TABLE tab_without_key; | ||
|
||
DROP TABLE tab_with_one_col_key; | ||
|
||
DROP TABLE tab_with_multi_col_key; | ||
|
||
\c pgsql_testdb; | ||
DROP DATABASE mytest_on_create_table; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
CREATE DATABASE mytest_on_insert; | ||
\c mytest_on_insert; | ||
|
||
CREATE TABLE tab_without_key(id INT, name VARCHAR); | ||
|
||
INSERT INTO tab_without_key(id) VALUES(1); | ||
INSERT INTO tab_without_key(name) VALUES('one'); | ||
INSERT INTO tab_without_key(id, name) VALUES(2, 'two'); | ||
INSERT INTO tab_without_key VALUES(1, 'one'); | ||
|
||
SELECT id FROM tab_without_key; | ||
SELECT name FROM tab_without_key; | ||
SELECT id, name FROM tab_without_key; | ||
SELECT * FROM tab_without_key; | ||
|
||
CREATE TABLE tab_with_one_col_key(id INT PRIMARY KEY, name VARCHAR); | ||
|
||
INSERT INTO tab_with_one_col_key(id) VALUES(1); | ||
INSERT INTO tab_with_one_col_key(name) VALUES('one'); | ||
INSERT INTO tab_with_one_col_key(id, name) VALUES(2, 'two'); | ||
INSERT INTO tab_with_one_col_key VALUES(1, 'one'); | ||
|
||
SELECT id FROM tab_with_one_col_key; | ||
SELECT name FROM tab_with_one_col_key; | ||
SELECT id, name FROM tab_with_one_col_key; | ||
SELECT * FROM tab_with_one_col_key; | ||
|
||
CREATE TABLE tab_with_multi_col_key(id INT, | ||
name VARCHAR, | ||
salary DOUBLE PRECISION, primary key(id, name)); | ||
|
||
INSERT INTO tab_with_multi_col_key(id) VALUES(1); | ||
INSERT INTO tab_with_multi_col_key(name) VALUES('one'); | ||
INSERT INTO tab_with_multi_col_key(id, name) VALUES(2, 'two'); | ||
INSERT INTO tab_with_multi_col_key VALUES(3, 'three', 999.99); | ||
|
||
SELECT id FROM tab_with_multi_col_key; | ||
SELECT name FROM tab_with_multi_col_key; | ||
SELECT id, name FROM tab_with_multi_col_key; | ||
SELECT id, name, salary FROM tab_with_multi_col_key; | ||
SELECT * FROM tab_with_multi_key; | ||
|
||
DROP TABLE tab_without_key; | ||
DROP TABLE tab_with_one_col_key; | ||
DROP TABLE tab_with_multi_col_key; | ||
|
||
\c pgsql_testdb; | ||
DROP DATABASE mytest_on_insert; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
DATABASE CREATED | ||
TABLE CREATED | ||
TABLE CREATED | ||
TABLE CREATED | ||
TABLE DROPPED | ||
TABLE DROPPED | ||
TABLE DROPPED | ||
DATABASE DROPPED |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
DATABASE CREATED | ||
TABLE CREATED | ||
INSERT 0 1 | ||
INSERT 0 1 | ||
INSERT 0 1 | ||
INSERT 0 1 | ||
id | ||
---- | ||
1 | ||
|
||
2 | ||
1 | ||
(4 rows) | ||
|
||
name | ||
------ | ||
|
||
one | ||
two | ||
one | ||
(4 rows) | ||
|
||
id | name | ||
----+------ | ||
1 | | ||
| one | ||
2 | two | ||
1 | one | ||
(4 rows) | ||
|
||
id | name | ||
----+------ | ||
1 | | ||
| one | ||
2 | two | ||
1 | one | ||
(4 rows) | ||
|
||
TABLE CREATED | ||
INSERT 0 1 | ||
INSERT 0 1 | ||
INSERT 0 1 | ||
id | ||
---- | ||
1 | ||
2 | ||
(2 rows) | ||
|
||
name | ||
------ | ||
one | ||
two | ||
(2 rows) | ||
|
||
id | name | ||
----+------ | ||
1 | one | ||
2 | two | ||
(2 rows) | ||
|
||
id | name | ||
----+------ | ||
1 | one | ||
2 | two | ||
(2 rows) | ||
|
||
TABLE CREATED | ||
INSERT 0 1 | ||
INSERT 0 1 | ||
id | ||
---- | ||
2 | ||
3 | ||
(2 rows) | ||
|
||
name | ||
------- | ||
two | ||
three | ||
(2 rows) | ||
|
||
id | name | ||
----+------- | ||
2 | two | ||
3 | three | ||
(2 rows) | ||
|
||
id | name | salary | ||
----+-------+------------ | ||
2 | two | | ||
3 | three | 999.990000 | ||
(2 rows) | ||
|
||
TABLE DROPPED | ||
TABLE DROPPED | ||
TABLE DROPPED | ||
DATABASE DROPPED |
Oops, something went wrong.