Merge pull request #1216 from basho/feature-gg-delete

Added regression tests for sql delete
This commit is contained in:
James Gorlick 2016-12-01 12:35:49 -08:00 committed by GitHub
commit 5acf26243e

View File

@ -1,3 +1,4 @@
%% -*- erlang -*-
{{command, "reconnect; "}, {result, "Reconnected to 'dev1@127.0.0.1' on port 10017"}}.
{{command, "show_connection; "}, {result, "riak-shell is connected to: 'dev1@127.0.0.1' on port 10017"}}.
{{command, "show_nodes; "}, {result, "The connected nodes are: ['dev1@127.0.0.1','dev2@127.0.0.1','dev3@127.0.0.1']"}}.
@ -80,6 +81,13 @@ family1,series1,1970-01-01T00:00:00.007Z,cloudy,27.9
555,1.1,10.0,0.01123
555,1.1,10.0,0.01123
"}}.
{{command, "CREATE TABLE deletetable ( myfamily varchar not null, myseries varchar not null, time timestamp not null, weather varchar not null, temperature double, PRIMARY KEY ((myfamily, myseries, quantum(time, 15, 'm')), myfamily, myseries, time));"}, {result, "Table deletetable successfully created and activated."}}.
{{command, "insert into deletetable (myfamily, myseries, time, weather, temperature) values ('berl', 'saf', 3, 'safa', 3.3);"}, {result, "Inserted 1 row."}}.
{{command, "select * from deletetable where myfamily = 'berl' and myseries = 'saf' and time > 1 and time < 5;"}, {result, "myfamily,myseries,time,weather,temperature\nberl,saf,1970-01-01T00:00:00.003Z,safa,3.3\n"
}}.
{{command, "delete from deletetable where myfamily = 'berl' and myseries = 'saf' and time = 3;"}, {result, ""}}.
{{command, "select * from deletetable where myfamily = 'berl' and myseries = 'saf' and time > 1 and time < 5;"}, {result, "No rows returned."}}.
{{command, "delete from deletetable where myfamily = 'berl' and myseries = 'saf' and timebob = 3;"}, {result, "Error (1009): Unable to get delete key: [\"invalid key\"]"}}.
{{command, "SHOW CREATE TABLE GeoCheckin2;\n"}, {result, "CREATE TABLE GeoCheckin2 (region VARCHAR NOT NULL,
state VARCHAR NOT NULL,
time TIMESTAMP NOT NULL,