Skip to content

Commit

Permalink
[t] Add test.
Browse files Browse the repository at this point in the history
  • Loading branch information
rryqszq4 committed Nov 9, 2018
1 parent 5e8f153 commit cc20681
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .travis/test.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#!/bin/bash
# Copyright (c) 2018, rryqszq4 <[email protected]>
echo "ngx_sqlite test ..."
NGX_PATH=`pwd`'/build/nginx/sbin'
${NGX_PATH}/nginx -V
export PATH=${NGX_PATH}:$PATH
prove -r t
21 changes: 21 additions & 0 deletions t/001-database.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# vim:set ft= ts=4 sw=4 et fdm=marker:

use Test::Nginx::Socket 'no_plan';

$ENV{'TEST_NGINX_BUILD_DIR'} = $ENV{'TRAVIS_BUILD_DIR'};

run_tests();

__DATA__
=== TEST 1: sqlite_database
sqlite_database
--- http_config
sqlite_database $TEST_NGINX_BUILD_DIR/build/test.db;
--- config
location = /sqlite_database {
sqlite_query 'select * from test;';
}
--- request
GET /sqlite_database
--- response_body
no such table: test

0 comments on commit cc20681

Please sign in to comment.