From: Paweł Chmielowski Date: Mon, 5 Sep 2016 14:42:05 +0000 (+0200) Subject: ejabberd_oauth requiere working cache_tab, initialize it before tests X-Git-Tag: 16.09~33 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=96a748d34f05f31c3b045a54f9d4ab0555e0f9cc;p=ejabberd ejabberd_oauth requiere working cache_tab, initialize it before tests --- diff --git a/test/ejabberd_oauth_mock.exs b/test/ejabberd_oauth_mock.exs index e6a34f65e..965bff1e6 100644 --- a/test/ejabberd_oauth_mock.exs +++ b/test/ejabberd_oauth_mock.exs @@ -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