From fc49f1ab55de01268d417977c3c8050b1dd90cc4 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Mon, 27 Jul 2015 19:57:02 +0300 Subject: [PATCH] dbms: added tests [#METR-17491]. --- .../00209_insert_select_extremes.reference | 11 +++++++++++ .../0_stateless/00209_insert_select_extremes.sql | 11 +++++++++++ .../00210_insert_select_extremes_http.reference | 3 +++ .../0_stateless/00210_insert_select_extremes_http.sh | 6 ++++++ 4 files changed, 31 insertions(+) create mode 100644 dbms/tests/queries/0_stateless/00209_insert_select_extremes.reference create mode 100644 dbms/tests/queries/0_stateless/00209_insert_select_extremes.sql create mode 100644 dbms/tests/queries/0_stateless/00210_insert_select_extremes_http.reference create mode 100755 dbms/tests/queries/0_stateless/00210_insert_select_extremes_http.sh diff --git a/dbms/tests/queries/0_stateless/00209_insert_select_extremes.reference b/dbms/tests/queries/0_stateless/00209_insert_select_extremes.reference new file mode 100644 index 00000000000..e86726625a1 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00209_insert_select_extremes.reference @@ -0,0 +1,11 @@ + +1 +1 + +0 + +0 + +1 +1 +4 1 1 diff --git a/dbms/tests/queries/0_stateless/00209_insert_select_extremes.sql b/dbms/tests/queries/0_stateless/00209_insert_select_extremes.sql new file mode 100644 index 00000000000..0d632992b67 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00209_insert_select_extremes.sql @@ -0,0 +1,11 @@ +DROP TABLE IF EXISTS test.test; +CREATE TABLE test.test (x UInt8) ENGINE = Log; + +INSERT INTO test.test SELECT 1 AS x; +INSERT INTO test.test SELECT 1 AS x SETTINGS extremes = 1; +INSERT INTO test.test SELECT 1 AS x GROUP BY 1 WITH TOTALS; +INSERT INTO test.test SELECT 1 AS x GROUP BY 1 WITH TOTALS SETTINGS extremes = 1; + +SELECT count(), min(x), max(x) FROM test.test; + +DROP TABLE test.test; diff --git a/dbms/tests/queries/0_stateless/00210_insert_select_extremes_http.reference b/dbms/tests/queries/0_stateless/00210_insert_select_extremes_http.reference new file mode 100644 index 00000000000..016f3290af0 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00210_insert_select_extremes_http.reference @@ -0,0 +1,3 @@ + +1 +1 diff --git a/dbms/tests/queries/0_stateless/00210_insert_select_extremes_http.sh b/dbms/tests/queries/0_stateless/00210_insert_select_extremes_http.sh new file mode 100755 index 00000000000..c23a596b09d --- /dev/null +++ b/dbms/tests/queries/0_stateless/00210_insert_select_extremes_http.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +curl http://localhost:8123/?extremes=1 -d @- <<< "DROP TABLE IF EXISTS test.test" +curl http://localhost:8123/?extremes=1 -d @- <<< "CREATE TABLE test.test (x UInt8) ENGINE = Log" +curl http://localhost:8123/?extremes=1 -d @- <<< "INSERT INTO test.test SELECT 1 AS x" +curl http://localhost:8123/?extremes=1 -d @- <<< "DROP TABLE test.test"