Skip to content

Commit

Permalink
fix tests with updated buffer internal
Browse files Browse the repository at this point in the history
  • Loading branch information
tagomoris committed Jun 21, 2016
1 parent ba23a16 commit 8985883
Show file tree
Hide file tree
Showing 3 changed files with 330 additions and 106 deletions.
6 changes: 3 additions & 3 deletions test/plugin/test_buf_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def write_metadata(path, chunk_id, metadata, size, ctime, mtime)
assert c1.is_a? Fluent::Plugin::Buffer::FileChunk
assert_equal m1, c1.metadata
assert c1.empty?
assert_equal :staged, c1.state
assert_equal :unstaged, c1.state
assert_equal Fluent::Plugin::Buffer::FileChunk::FILE_PERMISSION, c1.permission
assert_equal @bufpath.gsub('.*.', ".b#{Fluent::UniqueId.hex(c1.unique_id)}."), c1.path
assert{ File.stat(c1.path).mode.to_s(8).end_with?('644') }
Expand All @@ -191,7 +191,7 @@ def write_metadata(path, chunk_id, metadata, size, ctime, mtime)
assert c2.is_a? Fluent::Plugin::Buffer::FileChunk
assert_equal m2, c2.metadata
assert c2.empty?
assert_equal :staged, c2.state
assert_equal :unstaged, c2.state
assert_equal Fluent::Plugin::Buffer::FileChunk::FILE_PERMISSION, c2.permission
assert_equal @bufpath.gsub('.*.', ".b#{Fluent::UniqueId.hex(c2.unique_id)}."), c2.path
assert{ File.stat(c2.path).mode.to_s(8).end_with?('644') }
Expand Down Expand Up @@ -221,7 +221,7 @@ def write_metadata(path, chunk_id, metadata, size, ctime, mtime)
assert c.is_a? Fluent::Plugin::Buffer::FileChunk
assert_equal m, c.metadata
assert c.empty?
assert_equal :staged, c.state
assert_equal :unstaged, c.state
assert_equal 0600, c.permission
assert_equal bufpath.gsub('.*.', ".b#{Fluent::UniqueId.hex(c.unique_id)}."), c.path
assert{ File.stat(c.path).mode.to_s(8).end_with?('600') }
Expand Down
Loading

0 comments on commit 8985883

Please sign in to comment.