Sha256: ed36c66db94b18126368787fdd62ce4960b7a5660b96fbd13653566b96ff6814
Contents?: true
Size: 1.06 KB
Versions: 8
Compression:
Stored size: 1.06 KB
Contents
require "feature_store_spec_base" require "diplomat" require "spec_helper" $my_prefix = 'testprefix' $null_log = ::Logger.new($stdout) $null_log.level = ::Logger::FATAL $consul_base_opts = { prefix: $my_prefix, logger: $null_log } def create_consul_store(opts = {}) LaunchDarkly::Integrations::Consul::new_feature_store( $consul_base_opts.merge(opts).merge({ expiration: 60 })) end def create_consul_store_uncached(opts = {}) LaunchDarkly::Integrations::Consul::new_feature_store( $consul_base_opts.merge(opts).merge({ expiration: 0 })) end def clear_all_data Diplomat::Kv.delete($my_prefix + '/', recurse: true) end describe "Consul feature store" do return if ENV['LD_SKIP_DATABASE_TESTS'] == '1' # These tests will all fail if there isn't a local Consul instance running. context "with local cache" do include_examples "feature_store", method(:create_consul_store), method(:clear_all_data) end context "without local cache" do include_examples "feature_store", method(:create_consul_store_uncached), method(:clear_all_data) end end
Version data entries
8 entries across 8 versions & 2 rubygems