Skip to content

Commit

Permalink
Merge pull request #2855 from fluent/fix-appveyor-ci-round1
Browse files Browse the repository at this point in the history
Fix appveyor ci round1
  • Loading branch information
cosmo0920 committed Mar 4, 2020
2 parents f412df5 + a1e736a commit 1fa83cb
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
6 changes: 5 additions & 1 deletion test/plugin/test_in_tail.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,11 @@ def test_pos_file_dir_creation_with_system_dir_permission
end

assert_path_exist("#{TMP_DIR}/pos")
assert_equal '744', File.stat("#{TMP_DIR}/pos").mode.to_s(8)[-3, 3]
if Fluent.windows?
assert_equal '755', File.stat("#{TMP_DIR}/pos").mode.to_s(8)[-3, 3]
else
assert_equal '744', File.stat("#{TMP_DIR}/pos").mode.to_s(8)[-3, 3]
end
ensure
cleanup_directory(TMP_DIR)
end
Expand Down
2 changes: 2 additions & 0 deletions test/plugin/test_output_as_buffered_backup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,8 @@ def wait_flush(target_file)
end

test 'create directory with specific mode' do
omit "NTFS doesn't support UNIX like permissions" if Fluent.windows?

Fluent::SystemConfig.overwrite_system_config('root_dir' => TMP_DIR, 'dir_permission' => '744') do
id = 'backup_test_with_same_secondary'
hash = { 'flush_interval' => 1, 'flush_thread_burst_interval' => 0.1 }
Expand Down
2 changes: 2 additions & 0 deletions test/test_logger_initializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ class LoggerInitializerTest < ::Test::Unit::TestCase
end

test 'apply_options with log_dir_perm' do
omit "NTFS doesn't support UNIX like permissions" if Fluent.windows?

path = File.join(TMP_DIR, 'fluent_with_path.log')

assert_false File.exist?(TMP_DIR)
Expand Down
2 changes: 2 additions & 0 deletions test/test_plugin_id.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ class MyPlugin < Fluent::Plugin::Base
end

test '#plugin_root_dir create dirctory with specify mode if not exists ' do
omit "NTFS doesn't support UNIX like permissions" if Fluent.windows?

root_dir = Fluent::SystemConfig.overwrite_system_config({ 'root_dir' => File.join(TMP_DIR, "myroot"), 'dir_permission' => '0777' }) do
@p.plugin_root_dir
end
Expand Down
2 changes: 1 addition & 1 deletion test/test_supervisor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def test_rpc_server

assert{ $log.out.logs.first.end_with?(info_msg) }
ensure
$log.out.reset
$log.out.reset if $log.out.is_a?(Fluent::Test::DummyLogDevice)
end

def test_load_config
Expand Down

0 comments on commit 1fa83cb

Please sign in to comment.