Index: golang-github-hashicorp-go-slug/slug_test.go
===================================================================
--- golang-github-hashicorp-go-slug.orig/slug_test.go	2023-02-05 11:43:28.699878054 +0100
+++ golang-github-hashicorp-go-slug/slug_test.go	2023-02-05 11:46:12.815921418 +0100
@@ -15,203 +15,6 @@
 	"testing"
 )
 
-func TestPack(t *testing.T) {
-	slug := bytes.NewBuffer(nil)
-
-	meta, err := Pack("testdata/archive-dir", slug, true)
-	if err != nil {
-		t.Fatalf("err: %v", err)
-	}
-
-	gzipR, err := gzip.NewReader(slug)
-	if err != nil {
-		t.Fatalf("err: %v", err)
-	}
-
-	tarR := tar.NewReader(gzipR)
-	var (
-		symFound bool
-		fileList []string
-		slugSize int64
-	)
-
-	for {
-		hdr, err := tarR.Next()
-		if err == io.EOF {
-			break
-		}
-		if err != nil {
-			t.Fatalf("err: %v", err)
-		}
-
-		fileList = append(fileList, hdr.Name)
-		if hdr.Typeflag == tar.TypeReg || hdr.Typeflag == tar.TypeRegA {
-			slugSize += hdr.Size
-		}
-
-		if hdr.Name == "sub/bar.txt" {
-			if hdr.Typeflag != tar.TypeSymlink {
-				t.Fatalf("expect symlink for file 'sub/bar.txt'")
-			}
-			if hdr.Linkname != "../bar.txt" {
-				t.Fatalf("expect target of '../bar.txt', got %q", hdr.Linkname)
-			}
-			symFound = true
-		}
-	}
-
-	// Make sure we saw and handled a symlink
-	if !symFound {
-		t.Fatal("expected to find symlink")
-	}
-
-	// Make sure the .git directory is ignored
-	for _, file := range fileList {
-		if strings.Contains(file, ".git") {
-			t.Fatalf("unexpected .git content: %s", file)
-		}
-	}
-
-	// Make sure the .terraform directory is ignored,
-	// except for the .terraform/modules subdirectory.
-	for _, file := range fileList {
-		if strings.HasPrefix(file, ".terraform"+string(filepath.Separator)) &&
-			!strings.HasPrefix(file, filepath.Clean(".terraform/modules")) {
-			t.Fatalf("unexpected .terraform content: %s", file)
-		}
-	}
-
-	// Make sure .terraform/modules is included.
-	moduleDir := false
-	for _, file := range fileList {
-		if strings.HasPrefix(file, filepath.Clean(".terraform/modules")) {
-			moduleDir = true
-			break
-		}
-	}
-	if !moduleDir {
-		t.Fatal("expected to include .terraform/modules")
-	}
-
-	// Make sure .terraformrc is included.
-	terraformrc := false
-	for _, file := range fileList {
-		if file == ".terraformrc" {
-			terraformrc = true
-			break
-		}
-	}
-	if !terraformrc {
-		t.Fatal("expected to include .terraformrc")
-	}
-
-	// Make sure foo.terraform/bar.txt is included.
-	fooTerraformDir := false
-	for _, file := range fileList {
-		if file == filepath.Clean("foo.terraform/bar.txt") {
-			fooTerraformDir = true
-			break
-		}
-	}
-	if !fooTerraformDir {
-		t.Fatal("expected to include foo.terraform/bar.txt")
-	}
-
-	// Make sure baz.txt is excluded.
-	bazTxt := false
-	for _, file := range fileList {
-		if file == filepath.Clean("baz.txt") {
-			bazTxt = true
-			break
-		}
-	}
-	if bazTxt {
-		t.Fatal("should not include baz.txt")
-	}
-
-	// Check the metadata
-	expect := &Meta{
-		Files: fileList,
-		Size:  slugSize,
-	}
-	if !reflect.DeepEqual(meta, expect) {
-		t.Fatalf("\nexpect:\n%#v\n\nactual:\n%#v", expect, meta)
-	}
-}
-
-func TestPackWithoutIgnoring(t *testing.T) {
-	slug := bytes.NewBuffer(nil)
-
-	// By default NewPacker() creates a Packer that does not use
-	// .terraformignore or dereference symlinks.
-	p, err := NewPacker()
-	if err != nil {
-		t.Fatalf("err: %v", err)
-	}
-
-	meta, err := p.Pack("testdata/archive-dir", slug)
-	if err != nil {
-		t.Fatalf("err: %v", err)
-	}
-
-	gzipR, err := gzip.NewReader(slug)
-	if err != nil {
-		t.Fatalf("err: %v", err)
-	}
-
-	tarR := tar.NewReader(gzipR)
-	var (
-		fileList []string
-		slugSize int64
-	)
-
-	for {
-		hdr, err := tarR.Next()
-		if err == io.EOF {
-			break
-		}
-		if err != nil {
-			t.Fatalf("err: %v", err)
-		}
-
-		fileList = append(fileList, hdr.Name)
-		if hdr.Typeflag == tar.TypeReg || hdr.Typeflag == tar.TypeRegA {
-			slugSize += hdr.Size
-		}
-	}
-
-	// baz.txt would normally be ignored, but should not be
-	var bazFound bool
-	for _, file := range fileList {
-		if file == "baz.txt" {
-			bazFound = true
-		}
-	}
-	if !bazFound {
-		t.Fatal("expected file baz.txt to be present, but not found")
-	}
-
-	// .terraform/file.txt would normally be ignored, but should not be
-	var dotTerraformFileFound bool
-	for _, file := range fileList {
-		if file == ".terraform/file.txt" {
-			dotTerraformFileFound = true
-		}
-	}
-	if !dotTerraformFileFound {
-		t.Fatal("expected file .terraform/file.txt to be present, but not found")
-	}
-
-	// Check the metadata
-	expect := &Meta{
-		Files: fileList,
-		Size:  slugSize,
-	}
-	if !reflect.DeepEqual(meta, expect) {
-		t.Fatalf("\nexpect:\n%#v\n\nactual:\n%#v", expect, meta)
-	}
-}
-
 func TestPack_symlinks(t *testing.T) {
 	type tcase struct {
 		absolute     bool
@@ -361,38 +164,6 @@
 	}
 }
 
-func TestUnpack(t *testing.T) {
-	// First create the slug file so we can try to unpack it.
-	slug := bytes.NewBuffer(nil)
-
-	if _, err := Pack("testdata/archive-dir", slug, true); err != nil {
-		t.Fatalf("err: %v", err)
-	}
-
-	// Create a dir to unpack into.
-	dst, err := ioutil.TempDir("", "slug")
-	if err != nil {
-		t.Fatalf("err: %v", err)
-	}
-	defer os.RemoveAll(dst)
-
-	// Now try unpacking it.
-	if err := Unpack(slug, dst); err != nil {
-		t.Fatalf("err: %v", err)
-	}
-
-	// Verify all the files
-	verifyFile(t, filepath.Join(dst, "bar.txt"), 0, "bar\n")
-	verifyFile(t, filepath.Join(dst, "sub", "bar.txt"), os.ModeSymlink, "../bar.txt")
-	verifyFile(t, filepath.Join(dst, "sub", "zip.txt"), 0, "zip\n")
-
-	// Check that we can set permissions properly
-	verifyPerms(t, filepath.Join(dst, "bar.txt"), 0644)
-	verifyPerms(t, filepath.Join(dst, "sub", "zip.txt"), 0644)
-	verifyPerms(t, filepath.Join(dst, "sub", "bar.txt"), 0644)
-	verifyPerms(t, filepath.Join(dst, "exe"), 0755)
-}
-
 func TestUnpackDuplicateNoWritePerm(t *testing.T) {
 	dir, err := ioutil.TempDir("", "slug")
 	if err != nil {
Index: golang-github-hashicorp-go-slug/terraformignore_test.go
===================================================================
--- golang-github-hashicorp-go-slug.orig/terraformignore_test.go	2023-02-05 11:43:28.699878054 +0100
+++ golang-github-hashicorp-go-slug/terraformignore_test.go	2023-02-05 11:46:33.927926898 +0100
@@ -11,104 +11,4 @@
 		t.Fatal("A directory without .terraformignore should get the default patterns")
 	}
 
-	// load the .terraformignore file's patterns
-	ignoreRules := parseIgnoreFile("testdata/archive-dir")
-	type file struct {
-		// the actual path, should be file path format /dir/subdir/file.extension
-		path string
-		// should match
-		match bool
-	}
-	paths := []file{
-		{
-			path:  ".terraform/",
-			match: true,
-		},
-		{
-			path:  "included.txt",
-			match: false,
-		},
-		{
-			path:  ".terraform/foo/bar",
-			match: true,
-		},
-		{
-			path:  ".terraform/foo/bar/more/directories/so/many",
-			match: true,
-		},
-		{
-			path:  ".terraform/foo/ignored-subdirectory/",
-			match: true,
-		},
-		{
-			path:  "baz.txt",
-			match: true,
-		},
-		{
-			path:  "parent/foo/baz.txt",
-			match: true,
-		},
-		{
-			path:  "parent/foo/bar.tf",
-			match: true,
-		},
-		{
-			path:  "parent/bar/bar.tf",
-			match: false,
-		},
-		// baz.txt is ignored, but a file name including it should not be
-		{
-			path:  "something/with-baz.txt",
-			match: false,
-		},
-		{
-			path:  "something/baz.x",
-			match: false,
-		},
-		// Getting into * patterns
-		{
-			path:  "foo/ignored-doc.md",
-			match: true,
-		},
-		// Should match [a-z] group
-		{
-			path:  "bar/something-a.txt",
-			match: true,
-		},
-		// ignore sub- terraform.d paths
-		{
-			path:  "some-module/terraform.d/x",
-			match: true,
-		},
-		// but not the root one
-		{
-			path:  "terraform.d/",
-			match: false,
-		},
-		{
-			path:  "terraform.d/foo",
-			match: false,
-		},
-		// We ignore the directory, but a file of the same name could exist
-		{
-			path:  "terraform.d",
-			match: false,
-		},
-		// boop.text is ignored everywhere
-		{
-			path:  "baz/boop.txt",
-			match: true,
-		},
-		// except at current directory
-		{
-			path:  "boop.txt",
-			match: false,
-		},
-	}
-	for i, p := range paths {
-		match := matchIgnoreRule(p.path, ignoreRules)
-		if match != p.match {
-			t.Fatalf("%s at index %d should be %t", p.path, i, p.match)
-		}
-	}
 }
