Sha256: cb558841a9ff32164f83bdc0d613b9d087141cfdd262ae5e98144e1b051982cf
Contents?: true
Size: 1019 Bytes
Versions: 16
Compression:
Stored size: 1019 Bytes
Contents
require "feature_store_spec_base" require "diplomat" require "spec_helper" $my_prefix = 'testprefix' $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 break 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
16 entries across 16 versions & 1 rubygems