| a | b | |
|---|
| 0 | + | diff --git a/test/etap/160-vhosts.t b/test/etap/160-vhosts.t |
|---|
| 0 | + | index 89a71de..729c2f7 100755 |
|---|
| 0 | + | --- a/test/etap/160-vhosts.t |
|---|
| 0 | + | +++ b/test/etap/160-vhosts.t |
|---|
| 0 | + | @@ -155,9 +155,9 @@ test_regular_request() -> |
|---|
| 0 | + | test_vhost_request() -> |
|---|
| 0 | + | case ibrowse:send_req(server(), [], get, [], [{host_header, "example.com"}]) of |
|---|
| 0 | + | {ok, _, _, Body} -> |
|---|
| 0 | + | - {[{<<"db_name">>, <<"etap-test-db">>},_,_,_,_,_,_,_,_,_]} |
|---|
| 0 | + | - = ejson:decode(Body), |
|---|
| 0 | + | - etap:is(true, true, "should return database info"); |
|---|
| 0 | + | + {JsonBody} = ejson:decode(Body), |
|---|
| 0 | + | + HasDbNameInfo = proplists:is_defined(<<"db_name">>, JsonBody), |
|---|
| 0 | + | + etap:is(HasDbNameInfo, true, "should return database info"); |
|---|
| 0 | + | _Else -> |
|---|
| 0 | + | etap:is(false, true, <<"ibrowse fail">>) |
|---|
| 0 | + | end. |
|---|
| 0 | + | @@ -222,9 +222,9 @@ test_vhost_request_wildcard()-> |
|---|
| 0 | + | test_vhost_request_replace_var() -> |
|---|
| 0 | + | case ibrowse:send_req(server(), [], get, [], [{host_header,"etap-test-db.example1.com"}]) of |
|---|
| 0 | + | {ok, _, _, Body} -> |
|---|
| 0 | + | - {[{<<"db_name">>, <<"etap-test-db">>},_,_,_,_,_,_,_,_,_]} |
|---|
| 0 | + | - = ejson:decode(Body), |
|---|
| 0 | + | - etap:is(true, true, "should return database info"); |
|---|
| 0 | + | + {JsonBody} = ejson:decode(Body), |
|---|
| 0 | + | + HasDbNameInfo = proplists:is_defined(<<"db_name">>, JsonBody), |
|---|
| 0 | + | + etap:is(HasDbNameInfo, true, "should return database info"); |
|---|
| 0 | + | _Else -> etap:is(false, true, <<"ibrowse fail">>) |
|---|
| 0 | + | end. |
|---|
| 0 | + | |
|---|
| 0 | + | @@ -242,9 +242,9 @@ test_vhost_request_replace_var1() -> |
|---|
| 0 | + | test_vhost_request_replace_wildcard() -> |
|---|
| 0 | + | case ibrowse:send_req(server(), [], get, [], [{host_header,"etap-test-db.example2.com"}]) of |
|---|
| 0 | + | {ok, _, _, Body} -> |
|---|
| 0 | + | - {[{<<"db_name">>, <<"etap-test-db">>},_,_,_,_,_,_,_,_,_]} |
|---|
| 0 | + | - = ejson:decode(Body), |
|---|
| 0 | + | - etap:is(true, true, "should return database info"); |
|---|
| 0 | + | + {JsonBody} = ejson:decode(Body), |
|---|
| 0 | + | + HasDbNameInfo = proplists:is_defined(<<"db_name">>, JsonBody), |
|---|
| 0 | + | + etap:is(HasDbNameInfo, true, "should return database info"); |
|---|
| 0 | + | _Else -> etap:is(false, true, <<"ibrowse fail">>) |
|---|
| 0 | + | end. |
|---|
| 0 | + | |
|---|
| 0 | + | @@ -252,9 +252,9 @@ test_vhost_request_path() -> |
|---|
| 0 | + | Uri = server() ++ "test", |
|---|
| 0 | + | case ibrowse:send_req(Uri, [], get, [], [{host_header, "example.com"}]) of |
|---|
| 0 | + | {ok, _, _, Body} -> |
|---|
| 0 | + | - {[{<<"db_name">>, <<"etap-test-db">>},_,_,_,_,_,_,_,_,_]} |
|---|
| 0 | + | - = ejson:decode(Body), |
|---|
| 0 | + | - etap:is(true, true, "should return database info"); |
|---|
| 0 | + | + {JsonBody} = ejson:decode(Body), |
|---|
| 0 | + | + HasDbNameInfo = proplists:is_defined(<<"db_name">>, JsonBody), |
|---|
| 0 | + | + etap:is(HasDbNameInfo, true, "should return database info"); |
|---|
| 0 | + | _Else -> etap:is(false, true, <<"ibrowse fail">>) |
|---|
| 0 | + | end. |
|---|
| 0 | + | |
|---|
| 0 | + | @@ -272,9 +272,9 @@ test_vhost_request_path2() -> |
|---|
| 0 | + | Uri = server() ++ "test", |
|---|
| 0 | + | case ibrowse:send_req(Uri, [], get, [], [{host_header,"etap-test-db.example2.com"}]) of |
|---|
| 0 | + | {ok, _, _, Body} -> |
|---|
| 0 | + | - {[{<<"db_name">>, <<"etap-test-db">>},_,_,_,_,_,_,_,_,_]} |
|---|
| 0 | + | - = ejson:decode(Body), |
|---|
| 0 | + | - etap:is(true, true, "should return database info"); |
|---|
| 0 | + | + {JsonBody} = ejson:decode(Body), |
|---|
| 0 | + | + HasDbNameInfo = proplists:is_defined(<<"db_name">>, JsonBody), |
|---|
| 0 | + | + etap:is(HasDbNameInfo, true, "should return database info"); |
|---|
| 0 | + | _Else -> etap:is(false, true, <<"ibrowse fail">>) |
|---|
| 0 | + | end. |
|---|
| 0 | + | |
|---|
| ... | |
|---|