blob: 920291ba59ecf7422c034e7b7b1f9192db29eeaa [file] [log] [blame]
From 9e18eca690488e1c0ed1540f90dcd38599d2ec09 Mon Sep 17 00:00:00 2001
From: Nandhini Rengaraj <nrengaraj@google.com>
Date: Tue, 14 May 2024 21:46:13 +0000
Subject: [PATCH] integration/capabilities: Use network mode host
When capabilities_linux_test.go is run after integration/network tests,
docker build is not able to resolve URLs for building the
captest image and hence the test fails unable to find the image. Using
network=host with docker build resolves this error.
---
integration/capabilities/capabilities_linux_test.go | 1 +
1 file changed, 1 insertion(+)
diff --git a/integration/capabilities/capabilities_linux_test.go b/integration/capabilities/capabilities_linux_test.go
index 272f3dcdb7..8a837da204 100644
--- a/integration/capabilities/capabilities_linux_test.go
+++ b/integration/capabilities/capabilities_linux_test.go
@@ -40,6 +40,7 @@ func TestNoNewPrivileges(t *testing.T) {
source.AsTarReader(t),
types.ImageBuildOptions{
Tags: []string{imageTag},
+ NetworkMode: "host",
})
assert.NilError(t, err)
_, err = io.Copy(io.Discard, resp.Body)
--
2.45.0.rc1.225.g2a3ae87e7f-goog