Sha256: 4907795f8eb5788cf9ed95fa3278673b5ba992de5e972a1bd29550659757c9fc
Contents?: true
Size: 923 Bytes
Versions: 37
Compression:
Stored size: 923 Bytes
Contents
require 'spec_helper' require 'fluent/plugin/in_prometheus_tail_monitor' require 'fluent/test/driver/input' describe Fluent::Plugin::PrometheusTailMonitorInput do MONITOR_CONFIG = %[ @type prometheus_tail_monitor <labels> host ${hostname} foo bar </labels> ] INVALID_MONITOR_CONFIG = %[ @type prometheus_tail_monitor <labels> host ${hostname} foo bar invalid_use1 $.foo.bar invalid_use2 $[0][1] </labels> ] let(:config) { MONITOR_CONFIG } let(:driver) { Fluent::Test::Driver::Input.new(Fluent::Plugin::PrometheusTailMonitorInput).configure(config) } describe '#configure' do describe 'valid' do it 'does not raise error' do expect { driver }.not_to raise_error end end describe 'invalid' do let(:config) { INVALID_MONITOR_CONFIG } it 'expect raise error' do expect { driver }.to raise_error end end end end
Version data entries
37 entries across 37 versions & 4 rubygems