spec: reset MultiCache
fix :allthethings: Change-Id: I687529a965316c17d0c5c3e6d02282511a016801 Reviewed-on: https://gerrit.instructure.com/125849 Tested-by: Jenkins Reviewed-by: Cody Cutrer <cody@instructure.com> Product-Review: Cody Cutrer <cody@instructure.com> QA-Review: Cody Cutrer <cody@instructure.com>
This commit is contained in:
parent
a572ec9ffd
commit
84d2ffb47c
|
@ -62,6 +62,7 @@ describe EportfoliosController do
|
|||
}
|
||||
|
||||
before do
|
||||
allow(Canvas::DynamicSettings).to receive(:find).with(any_args).and_call_original
|
||||
allow(Canvas::DynamicSettings).to receive(:find).with("canvas").and_return(fake_secrets)
|
||||
end
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../../sharding_spec_helper.r
|
|||
|
||||
describe AddressBook::Service do
|
||||
before do
|
||||
allow(Canvas::DynamicSettings).to receive(:find).with(any_args).and_call_original
|
||||
allow(Canvas::DynamicSettings).to receive(:find).
|
||||
with("address-book", anything).
|
||||
and_return({'app-host' => 'http://test.host'})
|
||||
|
|
|
@ -23,6 +23,7 @@ describe InstFS do
|
|||
before do
|
||||
@app_host = 'http://test.host'
|
||||
@secret = "supersecretyup"
|
||||
allow(Canvas::DynamicSettings).to receive(:find).with(any_args).and_call_original
|
||||
allow(Canvas::DynamicSettings).to receive(:find).
|
||||
with(service: "inst-fs", default_ttl: 5.minutes).
|
||||
and_return({
|
||||
|
|
|
@ -23,6 +23,7 @@ module Services
|
|||
before do
|
||||
@app_host = "address-book"
|
||||
@secret = "opensesame"
|
||||
allow(Canvas::DynamicSettings).to receive(:find).with(any_args).and_call_original
|
||||
allow(Canvas::DynamicSettings).to receive(:find).
|
||||
with("address-book", default_ttl: 5.minutes).
|
||||
and_return({ "app-host" => @app_host, "secret" => Canvas::Security.base64_encode(@secret) })
|
||||
|
|
|
@ -24,6 +24,7 @@ module Services
|
|||
|
||||
context 'service unavailable' do
|
||||
before do
|
||||
allow(Canvas::DynamicSettings).to receive(:find).with(any_args).and_call_original
|
||||
allow(Canvas::DynamicSettings).to receive(:find)
|
||||
.with('live-events-subscription-service', default_ttl: 5.minutes)
|
||||
.and_return(nil)
|
||||
|
|
|
@ -22,6 +22,7 @@ module Services
|
|||
describe RichContent do
|
||||
before do
|
||||
allow(Services::RichContent).to receive(:contextually_on).and_call_original
|
||||
allow(Canvas::DynamicSettings).to receive(:find).with(any_args).and_call_original
|
||||
allow(Canvas::DynamicSettings).to receive(:find)
|
||||
.with('rich-content-service', default_ttl: 5.minutes)
|
||||
.and_return({
|
||||
|
|
|
@ -347,6 +347,7 @@ RSpec.configure do |config|
|
|||
Canvas::DynamicSettings.reset_cache!
|
||||
ActiveRecord::Migration.verbose = false
|
||||
RequestStore.clear!
|
||||
MultiCache.reset
|
||||
Course.enroll_user_call_count = 0
|
||||
$spec_api_tokens = {}
|
||||
end
|
||||
|
|
|
@ -26,6 +26,7 @@ RSpec.shared_context "JWT setup" do
|
|||
}
|
||||
|
||||
before do
|
||||
allow(Canvas::DynamicSettings).to receive(:find).with(any_args).and_call_original
|
||||
allow(Canvas::DynamicSettings).to receive(:find).with("canvas").and_return(fake_secrets)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue