~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/json_server/tests/t/basic.test

  • Committer: Stewart Smith
  • Date: 2011-05-02 07:46:14 UTC
  • mto: This revision was merged to the branch mainline in revision 2310.
  • Revision ID: stewart@flamingspork.com-20110502074614-cqogjkkndekg0hv1
use http_post() function to test json_server

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
create table t1 (a int primary key auto_increment, b varchar(100));
2
 
--exec  curl http://localhost:$PBMS_PORT/0.1/sql --data 'select * from t1;' 2> /dev/null
 
2
--replace_result $JSON_SERVER_PORT PORT
 
3
--eval select http_post("http://localhost:$JSON_SERVER_PORT/0.1/sql", 'select * from t1;');
3
4
insert into t1 (b) values ("from MySQL protocol");
4
 
--exec  curl http://localhost:$PBMS_PORT/0.1/sql --data 'select * from t1;' 2> /dev/null
5
 
--exec  curl http://localhost:$PBMS_PORT/0.1/sql --data 'insert into t1 (b) values ("from http";' 2> /dev/null
 
5
--replace_result $JSON_SERVER_PORT PORT
 
6
--eval select http_post('http://localhost:$JSON_SERVER_PORT/0.1/sql', 'select * from t1;');
 
7
--replace_result $JSON_SERVER_PORT PORT
 
8
--eval select http_post('http://localhost:$JSON_SERVER_PORT/0.1/sql', 'insert into t1 (b) values (\'from http\');');
6
9
SELECT * from t1;
7
10
drop table t1;