Sha256: 7943b05dc4e8f7c25c260a1778003de5c8f53bf9bbe665e7f9fe6923b1c4e447

Contents?: true

Size: 1.31 KB

Versions: 29

Compression:

Stored size: 1.31 KB

Contents

# encoding: utf-8

require_relative '../filewatch/spec_helper'

if LogStash::Environment.windows?
  describe "basic ops" do
    let(:fixture_dir) { Pathname.new(FileWatch::FIXTURE_DIR).expand_path }
    let(:file_path) { fixture_dir.join('uncompressed.log') }
    it "path works" do
      path = file_path.to_path
      identifier = Winhelper.identifier_from_path(path)
      STDOUT.puts("--- >>", identifier, "------")
      expect(identifier.count('-')).to eq(2)
      fs_name = Winhelper.file_system_type_from_path(path)
      STDOUT.puts("--- >>", fs_name, "------")
      expect(fs_name).to eq("NTFS")
      # identifier = Winhelper.identifier_from_path_ex(path)
      # STDOUT.puts("--- >>", identifier, "------")
      # expect(identifier.count('-')).to eq(2)
    end

    it "io works" do
      file = FileWatch::FileOpener.open(file_path.to_path)
      identifier = Winhelper.identifier_from_io(file)
      file.close
      STDOUT.puts("--- >>", identifier, "------")
      expect(identifier.count('-')).to eq(2)
      # fs_name = Winhelper.file_system_type_from_io(file)
      # STDOUT.puts("--- >>", fs_name, "------")
      # expect(fs_name).to eq("NTFS")
      # identifier = Winhelper.identifier_from_path_ex(path)
      # STDOUT.puts("--- >>", identifier, "------")
      # expect(identifier.count('-')).to eq(2)
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
logstash-input-file-4.4.6 spec/file_ext/file_ext_windows_spec.rb
logstash-input-file-4.4.5 spec/file_ext/file_ext_windows_spec.rb
logstash-input-file-4.4.4 spec/file_ext/file_ext_windows_spec.rb
logstash-input-file-4.4.3 spec/file_ext/file_ext_windows_spec.rb
logstash-input-file-4.4.2 spec/file_ext/file_ext_windows_spec.rb
logstash-input-file-4.4.1 spec/file_ext/file_ext_windows_spec.rb
logstash-input-file-4.4.0 spec/file_ext/file_ext_windows_spec.rb
logstash-input-file-4.3.1 spec/file_ext/file_ext_windows_spec.rb
logstash-input-file-4.3.0 spec/file_ext/file_ext_windows_spec.rb
logstash-input-file-4.2.4 spec/file_ext/file_ext_windows_spec.rb
logstash-input-file-4.2.3 spec/file_ext/file_ext_windows_spec.rb
logstash-input-file-4.2.2 spec/file_ext/file_ext_windows_spec.rb
logstash-input-file-4.2.1 spec/file_ext/file_ext_windows_spec.rb
logstash-input-file-4.2.0 spec/file_ext/file_ext_windows_spec.rb
logstash-input-file-4.1.18 spec/file_ext/file_ext_windows_spec.rb
logstash-input-file-4.1.17 spec/file_ext/file_ext_windows_spec.rb
logstash-input-file-4.1.16 spec/file_ext/file_ext_windows_spec.rb
logstash-input-file-4.1.15 spec/file_ext/file_ext_windows_spec.rb
logstash-input-file-4.1.14 spec/file_ext/file_ext_windows_spec.rb
logstash-input-file-4.1.13 spec/file_ext/file_ext_windows_spec.rb