test/test_out_s3.rb in fluent-plugin-s3-1.3.4 vs test/test_out_s3.rb in fluent-plugin-s3-1.4.0
- old
+ new
@@ -7,11 +7,10 @@
require 'test/unit/rr'
require 'zlib'
require 'fileutils'
require 'timecop'
-require 'uuidtools'
require 'ostruct'
include Fluent::Test::Helpers
class S3OutputTest < Test::Unit::TestCase
@@ -347,20 +346,14 @@
FileUtils.rm_f(s3_local_file_path)
end
def test_write_with_custom_s3_object_key_format_containing_uuid_flush_placeholder
- begin
- require 'uuidtools'
- rescue LoadError
- pend("uuidtools not found. skip this test")
- end
-
# Partial mock the S3Bucket, not to make an actual connection to Amazon S3
setup_mocks(true)
uuid = "5755e23f-9b54-42d8-8818-2ea38c6f279e"
- stub(::UUIDTools::UUID).random_create{ uuid }
+ stub(::SecureRandom).uuid{ uuid }
s3_local_file_path = "/tmp/s3-test.txt"
s3path = "log/events/ts=20110102-13/events_0-#{uuid}.gz"
setup_s3_object_mocks(s3_local_file_path: s3_local_file_path, s3path: s3path)