Package: docker-buildx / 0.13.1+ds1-3

0001-Skip-tests-that-assume-a-git-repo-or-network-access.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
From: Nicolas Peugnet <nicolas@club1.fr>
Date: Sun, 2 Feb 2025 17:45:20 +0100
Subject: Skip tests that assume a git repo or network access

The TestGit test assumes that we are in a git repository, which is not
always the case when building Debian packages.
The two test cases removed from TestGitRemoteURL assumes network access,
which is not the case on Debian's build infrastructure.
---
 util/gitutil/gitutil_test.go     | 31 +------------------------------
 util/metricutil/resource_test.go |  1 +
 2 files changed, 2 insertions(+), 30 deletions(-)

diff --git a/util/gitutil/gitutil_test.go b/util/gitutil/gitutil_test.go
index 06c6fa4..0366341 100644
--- a/util/gitutil/gitutil_test.go
+++ b/util/gitutil/gitutil_test.go
@@ -7,6 +7,7 @@ import (
 )
 
 func TestGit(t *testing.T) {
+	t.Skip("Debian-local: assumes being in a Git repository")
 	c, err := New()
 	require.NoError(t, err)
 
@@ -166,36 +167,6 @@ func TestGitRemoteURL(t *testing.T) {
 			},
 			fail: true,
 		},
-		{
-			name: "single tracking branch",
-			remotes: []remote{
-				{
-					name:     "foo",
-					url:      "https://github.com/tonistiigi/buildx.git",
-					tracking: "master",
-				},
-			},
-			expected: "https://github.com/tonistiigi/buildx.git",
-		},
-		{
-			name: "fork tracking branch",
-			remotes: []remote{
-				{
-					name: "origin",
-					url:  "git@github.com:crazy-max/buildx.git",
-				},
-				{
-					name:     "foobranch",
-					url:      "https://github.com/tonistiigi/buildx.git",
-					tracking: "master",
-				},
-				{
-					name: "crazymax",
-					url:  "git@github.com:crazy-max/buildx.git",
-				},
-			},
-			expected: "https://github.com/tonistiigi/buildx.git",
-		},
 	}
 	for _, tt := range cases {
 		tt := tt
diff --git a/util/metricutil/resource_test.go b/util/metricutil/resource_test.go
index 4b17e5c..159f0cc 100644
--- a/util/metricutil/resource_test.go
+++ b/util/metricutil/resource_test.go
@@ -8,6 +8,7 @@ import (
 )
 
 func TestResource(t *testing.T) {
+	t.Skip("Debian-local: requires network access")
 	setErrorHandler(t)
 
 	// Ensure resource creation doesn't result in an error.