Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix appveyor ci round1 #2855

Merged
merged 3 commits into from
Mar 4, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion test/plugin/test_in_tail.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1102,7 +1102,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 unless $log.out.is_a?(Fluent::LogDeviceIO)
cosmo0920 marked this conversation as resolved.
Show resolved Hide resolved
end

def test_load_config
Expand Down