Commits

Anonymous committed 55097f7

skip osmos test (with warning message) if osmos can't be started

Comments (0)

Files changed (1)

src/riak_osmos_backend.erl

 %%
 
 simple_test() ->
-    application:set_env(riak, riak_osmos_backend_root,
-                        "test/osmos-backend"),
-    ?assertCmd("rm -rf test/osmos-backend"),
-    riak_test_util:standard_backend_test(riak_osmos_backend).
+    case application:start(osmos) of
+       ok ->
+            application:set_env(riak, riak_osmos_backend_root,
+                                "test/osmos-backend"),
+            ?assertCmd("rm -rf test/osmos-backend"),
+            riak_test_util:standard_backend_test(riak_osmos_backend);
+       Error ->
+            ?debugFmt("Skipping osmos tests: ~p", [Error])
+    end.
+