mirror of
https://github.com/elastic/logstash.git
synced 2025-04-23 22:27:21 -04:00
Fix test for LogStash::Setting::WritableDirectory#set
path for unix domain socket have a hard limit of 104 on macos and 108 on linux, using `Stud::Temporary.pathname` to generate the path will exceed that limit. So we will use a custom generation of using the tmpdir + Time.now.to_f which should be good enough for this test. Fixes: #6108 Fixes #6110
This commit is contained in:
parent
7b811a91e9
commit
cbc91f7050
1 changed files with 7 additions and 2 deletions
|
@ -1,12 +1,17 @@
|
|||
# encoding: utf-8
|
||||
require "spec_helper"
|
||||
require "logstash/settings"
|
||||
require "stud/temporary"
|
||||
require "tmpdir"
|
||||
require "socket" # for UNIXSocket
|
||||
|
||||
|
||||
|
||||
|
||||
describe LogStash::Setting::WritableDirectory do
|
||||
let(:mode_rx) { 0555 }
|
||||
let(:parent) { Stud::Temporary.pathname }
|
||||
# linux is 108, Macos is 104, so use a safe value
|
||||
# Stud::Temporary.pathname, will exceed that size without adding anything
|
||||
let(:parent) { File.join(Dir.tmpdir, Time.now.to_f.to_s) }
|
||||
let(:path) { File.join(parent, "fancy") }
|
||||
|
||||
before { Dir.mkdir(parent) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue