Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
Signed-off-by: Anders Swanson <anders.swanson@oracle.com>
  • Loading branch information
anders-swanson committed Feb 14, 2022
1 parent f1c112c commit 57e012f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/plugin/test_out_opensearch_data_stream.rb
Expand Up @@ -367,6 +367,19 @@ def test_datastream_configure_retry
assert_equal "foo", driver(conf).instance.data_stream_name
end

def test_template_file
stub_default
cwd = File.dirname(__FILE__)
conf = config_element(
'ROOT', '', {
'@type' => OPENSEARCH_DATA_STREAM_TYPE,
'data_stream_name' => 'foo',
'data_stream_template_name' => "foo_tpl",
'template_file' => File.join(cwd, 'datastream_template.json')
})
assert_equal "foo", driver(conf).instance.data_stream_name
end

def test_existent_data_stream
stub_index_template
stub_existent_data_stream?
Expand Down

0 comments on commit 57e012f

Please sign in to comment.