]> granicus.if.org Git - ejabberd/commitdiff
ejabberd_oauth requiere working cache_tab, initialize it before tests
authorPaweł Chmielowski <pchmielowski@process-one.net>
Mon, 5 Sep 2016 14:42:05 +0000 (16:42 +0200)
committerPaweł Chmielowski <pchmielowski@process-one.net>
Mon, 5 Sep 2016 14:42:05 +0000 (16:42 +0200)
test/ejabberd_oauth_mock.exs

index e6a34f65e25cbecc447ada49df42a072ce42e9ca..965bff1e6d1252d58c8a62928bc3078ac1f6090b 100644 (file)
@@ -26,7 +26,10 @@ defmodule EjabberdOauthMock do
                :mnesia.start
                :mnesia.create_table(:oauth_token,
                          [ram_copies: [node],
-                                                                                                       attributes: [:oauth_token, :us, :scope, :expire]])
+                          attributes: [:oauth_token, :us, :scope, :expire]])
+    :application.start(:cache_tab)
+    :cache_tab.new(:oauth_token,
+                   [{:max_size, 1000}, {:life_time, 3600}])
        end
 
        def get_token(user, domain, command, expiration \\ 3600) do