summaryrefslogtreecommitdiff
path: root/test/etap
diff options
context:
space:
mode:
Diffstat (limited to 'test/etap')
-rw-r--r--test/etap/172-os-daemon-errors.1.sh17
-rwxr-xr-xtest/etap/172-os-daemon-errors.2.es16
-rwxr-xr-xtest/etap/172-os-daemon-errors.2.sh15
-rwxr-xr-xtest/etap/172-os-daemon-errors.3.es17
-rwxr-xr-xtest/etap/172-os-daemon-errors.3.sh15
-rwxr-xr-xtest/etap/172-os-daemon-errors.4.es17
-rwxr-xr-xtest/etap/172-os-daemon-errors.4.sh15
-rwxr-xr-xtest/etap/172-os-daemon-errors.t8
-rwxr-xr-x[-rw-r--r--]test/etap/190-oauth.t (renamed from test/etap/172-os-daemon-errors.1.es)27
-rw-r--r--test/etap/Makefile.am9
10 files changed, 89 insertions, 67 deletions
diff --git a/test/etap/172-os-daemon-errors.1.sh b/test/etap/172-os-daemon-errors.1.sh
new file mode 100644
index 00000000..345c8b40
--- /dev/null
+++ b/test/etap/172-os-daemon-errors.1.sh
@@ -0,0 +1,17 @@
+#!/bin/sh -e
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations under
+# the License.
+#
+# Please do not make this file executable as that's the error being tested.
+
+sleep 5
diff --git a/test/etap/172-os-daemon-errors.2.es b/test/etap/172-os-daemon-errors.2.es
deleted file mode 100755
index 52de0401..00000000
--- a/test/etap/172-os-daemon-errors.2.es
+++ /dev/null
@@ -1,16 +0,0 @@
-#! /usr/bin/env escript
-
-% Licensed under the Apache License, Version 2.0 (the "License"); you may not
-% use this file except in compliance with the License. You may obtain a copy of
-% the License at
-%
-% http://www.apache.org/licenses/LICENSE-2.0
-%
-% Unless required by applicable law or agreed to in writing, software
-% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-% License for the specific language governing permissions and limitations under
-% the License.
-
-main([]) ->
- init:stop().
diff --git a/test/etap/172-os-daemon-errors.2.sh b/test/etap/172-os-daemon-errors.2.sh
new file mode 100755
index 00000000..256ee793
--- /dev/null
+++ b/test/etap/172-os-daemon-errors.2.sh
@@ -0,0 +1,15 @@
+#!/bin/sh -e
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations under
+# the License.
+
+exit 1
diff --git a/test/etap/172-os-daemon-errors.3.es b/test/etap/172-os-daemon-errors.3.es
deleted file mode 100755
index 64229800..00000000
--- a/test/etap/172-os-daemon-errors.3.es
+++ /dev/null
@@ -1,17 +0,0 @@
-#! /usr/bin/env escript
-
-% Licensed under the Apache License, Version 2.0 (the "License"); you may not
-% use this file except in compliance with the License. You may obtain a copy of
-% the License at
-%
-% http://www.apache.org/licenses/LICENSE-2.0
-%
-% Unless required by applicable law or agreed to in writing, software
-% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-% License for the specific language governing permissions and limitations under
-% the License.
-
-main([]) ->
- timer:sleep(1000),
- init:stop().
diff --git a/test/etap/172-os-daemon-errors.3.sh b/test/etap/172-os-daemon-errors.3.sh
new file mode 100755
index 00000000..f5a13684
--- /dev/null
+++ b/test/etap/172-os-daemon-errors.3.sh
@@ -0,0 +1,15 @@
+#!/bin/sh -e
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations under
+# the License.
+
+sleep 1
diff --git a/test/etap/172-os-daemon-errors.4.es b/test/etap/172-os-daemon-errors.4.es
deleted file mode 100755
index 577f3410..00000000
--- a/test/etap/172-os-daemon-errors.4.es
+++ /dev/null
@@ -1,17 +0,0 @@
-#! /usr/bin/env escript
-
-% Licensed under the Apache License, Version 2.0 (the "License"); you may not
-% use this file except in compliance with the License. You may obtain a copy of
-% the License at
-%
-% http://www.apache.org/licenses/LICENSE-2.0
-%
-% Unless required by applicable law or agreed to in writing, software
-% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-% License for the specific language governing permissions and limitations under
-% the License.
-
-main([]) ->
- timer:sleep(2000),
- init:stop().
diff --git a/test/etap/172-os-daemon-errors.4.sh b/test/etap/172-os-daemon-errors.4.sh
new file mode 100755
index 00000000..5bc10e83
--- /dev/null
+++ b/test/etap/172-os-daemon-errors.4.sh
@@ -0,0 +1,15 @@
+#!/bin/sh -e
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations under
+# the License.
+
+sleep 2
diff --git a/test/etap/172-os-daemon-errors.t b/test/etap/172-os-daemon-errors.t
index 287a0812..bde5c6ff 100755
--- a/test/etap/172-os-daemon-errors.t
+++ b/test/etap/172-os-daemon-errors.t
@@ -30,16 +30,16 @@ config_files() ->
]).
bad_perms() ->
- test_util:source_file("test/etap/172-os-daemon-errors.1.es").
+ test_util:source_file("test/etap/172-os-daemon-errors.1.sh").
die_on_boot() ->
- test_util:source_file("test/etap/172-os-daemon-errors.2.es").
+ test_util:source_file("test/etap/172-os-daemon-errors.2.sh").
die_quickly() ->
- test_util:source_file("test/etap/172-os-daemon-errors.3.es").
+ test_util:source_file("test/etap/172-os-daemon-errors.3.sh").
can_reboot() ->
- test_util:source_file("test/etap/172-os-daemon-errors.4.es").
+ test_util:source_file("test/etap/172-os-daemon-errors.4.sh").
main(_) ->
test_util:init_code_path(),
diff --git a/test/etap/172-os-daemon-errors.1.es b/test/etap/190-oauth.t
index a9defba1..09922049 100644..100755
--- a/test/etap/172-os-daemon-errors.1.es
+++ b/test/etap/190-oauth.t
@@ -1,5 +1,4 @@
-#! /usr/bin/env escript
-
+#!/usr/bin/env escript
% Licensed under the Apache License, Version 2.0 (the "License"); you may not
% use this file except in compliance with the License. You may obtain a copy of
% the License at
@@ -12,11 +11,21 @@
% License for the specific language governing permissions and limitations under
% the License.
-% Please do not make this file executable as that's the error being tested.
-
-loop() ->
- timer:sleep(5000),
- loop().
+main(_) ->
+ test_util:init_code_path(),
+ etap:plan(1),
+ case (catch test()) of
+ ok ->
+ etap:end_tests();
+ Other ->
+ etap:diag(io_lib:format("Test died abnormally: ~p", [Other])),
+ etap:bail(Other)
+ end,
+ ok.
-main([]) ->
- loop().
+test() ->
+ etap:is(
+ oauth_uri:params_from_string("realm=http://localhost:5984"),
+ [{"realm","http://localhost:5984"}],
+ "decode should handle non-percent encoded input."),
+ ok.
diff --git a/test/etap/Makefile.am b/test/etap/Makefile.am
index 9ba3fcfa..ce52d430 100644
--- a/test/etap/Makefile.am
+++ b/test/etap/Makefile.am
@@ -77,12 +77,13 @@ EXTRA_DIST = \
170-os-daemons.t \
171-os-daemons-config.es \
171-os-daemons-config.t \
- 172-os-daemon-errors.1.es \
- 172-os-daemon-errors.2.es \
- 172-os-daemon-errors.3.es \
- 172-os-daemon-errors.4.es \
+ 172-os-daemon-errors.1.sh \
+ 172-os-daemon-errors.2.sh \
+ 172-os-daemon-errors.3.sh \
+ 172-os-daemon-errors.4.sh \
172-os-daemon-errors.t \
173-os-daemon-cfg-register.t \
180-http-proxy.ini \
180-http-proxy.t \
+ 190-oauth.t \
200-view-group-no-db-leaks.t