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.22 spec/integration/module_tool/tar/mini_spec.rb
puppet-5.5.22-x86-mingw32 spec/integration/module_tool/tar/mini_spec.rb
puppet-5.5.22-x64-mingw32 spec/integration/module_tool/tar/mini_spec.rb
puppet-5.5.22-universal-darwin spec/integration/module_tool/tar/mini_spec.rb
puppet-6.17.0 spec/integration/module_tool/tar/mini_spec.rb
puppet-6.17.0-x86-mingw32 spec/integration/module_tool/tar/mini_spec.rb
puppet-6.17.0-x64-mingw32 spec/integration/module_tool/tar/mini_spec.rb
puppet-6.17.0-universal-darwin spec/integration/module_tool/tar/mini_spec.rb
puppet-5.5.21 spec/integration/module_tool/tar/mini_spec.rb
puppet-5.5.21-x86-mingw32 spec/integration/module_tool/tar/mini_spec.rb
puppet-5.5.21-x64-mingw32 spec/integration/module_tool/tar/mini_spec.rb
puppet-5.5.21-universal-darwin spec/integration/module_tool/tar/mini_spec.rb
puppet-6.16.0 spec/integration/module_tool/tar/mini_spec.rb
puppet-6.16.0-x86-mingw32 spec/integration/module_tool/tar/mini_spec.rb
puppet-6.16.0-x64-mingw32 spec/integration/module_tool/tar/mini_spec.rb
puppet-6.16.0-universal-darwin spec/integration/module_tool/tar/mini_spec.rb
puppet-6.15.0 spec/integration/module_tool/tar/mini_spec.rb
puppet-6.15.0-x86-mingw32 spec/integration/module_tool/tar/mini_spec.rb
puppet-6.15.0-x64-mingw32 spec/integration/module_tool/tar/mini_spec.rb
puppet-6.15.0-universal-darwin spec/integration/module_tool/tar/mini_spec.rb