File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -9,11 +9,15 @@ class BareStorage < Fluent::Plugin::Storage
9
9
Fluent ::Plugin . register_storage ( 'bare' , self )
10
10
end
11
11
12
- class ExampleStorage < Fluent ::Plugin ::Storage
12
+ class BasicStorage < Fluent ::Plugin ::Storage
13
13
Fluent ::Plugin . register_storage ( 'example' , self )
14
14
15
15
attr_reader :data , :saved
16
16
17
+ def initialize
18
+ super
19
+ @data = @saved = nil
20
+ end
17
21
def load
18
22
@data = { }
19
23
end
@@ -107,15 +111,15 @@ class StorageTest < Test::Unit::TestCase
107
111
setup do
108
112
plugin = DummyPlugin . new
109
113
plugin . configure ( config_element ( 'ROOT' , '' , { '@id' => '1' } ) )
110
- @s = ExampleStorage . new
114
+ @s = BasicStorage . new
111
115
@s . configure ( config_element ( ) )
112
116
@s . owner = plugin
113
117
end
114
118
115
119
test 'load/save works well as plugin internal state operations' do
116
120
plugin = DummyPlugin . new
117
121
plugin . configure ( config_element ( 'ROOT' , '' , { '@id' => '0' } ) )
118
- s = ExampleStorage . new
122
+ s = BasicStorage . new
119
123
s . owner = plugin
120
124
121
125
assert_nothing_raised { s . load }
You can’t perform that action at this time.
0 commit comments