Sha256: 77653ee6f1302471424ab84ec52f889ea84d94f4e2f85b74cf742e516df6a89f

Contents?: true

Size: 1.09 KB

Versions: 372

Compression:

Stored size: 1.09 KB

Contents

require 'spec_helper'
require 'puppet/module_tool'
require 'puppet_spec/files'

describe Puppet::ModuleTool::Tar::Mini, :if => (Puppet.features.minitar? && Puppet.features.zlib?) do
  let(:minitar)    { described_class.new }

  describe "Extracts tars with long and short pathnames" do
    let (:sourcetar) { File.expand_path('../../../../fixtures/module.tar.gz', __FILE__) }

    let (:longfilepath)  { "puppetlabs-dsc-1.0.0/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebAppPoolDefaults/MSFT_xWebAppPoolDefaults.schema.mof" }
    let (:shortfilepath) { "puppetlabs-dsc-1.0.0/README.md" }

    it "unpacks a tar with a short path length" do
      extractdir = PuppetSpec::Files.tmpdir('minitar')

      minitar.unpack(sourcetar,extractdir,'module')
      expect(File).to exist(File.expand_path("#{extractdir}/#{shortfilepath}"))
    end

    it "unpacks a tar with a long path length" do
      extractdir = PuppetSpec::Files.tmpdir('minitar')

      minitar.unpack(sourcetar,extractdir,'module')
      expect(File).to exist(File.expand_path("#{extractdir}/#{longfilepath}"))
    end
  end
end

Version data entries

372 entries across 372 versions & 1 rubygems

Version Path
puppet-5.5.18-x86-mingw32 spec/integration/module_tool/tar/mini_spec.rb
puppet-6.4.5 spec/integration/module_tool/tar/mini_spec.rb
puppet-5.5.18-x64-mingw32 spec/integration/module_tool/tar/mini_spec.rb
puppet-6.4.5-x86-mingw32 spec/integration/module_tool/tar/mini_spec.rb
puppet-5.5.18-universal-darwin spec/integration/module_tool/tar/mini_spec.rb
puppet-6.4.5-x64-mingw32 spec/integration/module_tool/tar/mini_spec.rb
puppet-6.4.5-universal-darwin spec/integration/module_tool/tar/mini_spec.rb
puppet-6.12.0-universal-darwin spec/integration/module_tool/tar/mini_spec.rb
puppet-6.11.1 spec/integration/module_tool/tar/mini_spec.rb
puppet-6.11.1-x86-mingw32 spec/integration/module_tool/tar/mini_spec.rb
puppet-6.11.1-x64-mingw32 spec/integration/module_tool/tar/mini_spec.rb
puppet-6.11.1-universal-darwin spec/integration/module_tool/tar/mini_spec.rb
puppet-6.11.0 spec/integration/module_tool/tar/mini_spec.rb
puppet-6.11.0-x86-mingw32 spec/integration/module_tool/tar/mini_spec.rb
puppet-6.11.0-x64-mingw32 spec/integration/module_tool/tar/mini_spec.rb
puppet-6.11.0-universal-darwin spec/integration/module_tool/tar/mini_spec.rb
puppet-5.5.17-x86-mingw32 spec/integration/module_tool/tar/mini_spec.rb
puppet-5.5.17 spec/integration/module_tool/tar/mini_spec.rb
puppet-6.10.1 spec/integration/module_tool/tar/mini_spec.rb
puppet-5.5.17-x64-mingw32 spec/integration/module_tool/tar/mini_spec.rb