Skip to content

Commit

Permalink
test/client: Close buildkit client
Browse files Browse the repository at this point in the history
This fixes hang in these tests which caused a timeout.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
  • Loading branch information
vvoland committed Feb 28, 2023
1 parent db6342f commit 3b0aa69
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7356,11 +7356,13 @@ func testExportAttestations(t *testing.T, sb integration.Sandbox) {
requiresLinux(t)
c, err := New(sb.Context(), sb.Address())
require.NoError(t, err)
defer c.Close()

registry, err := sb.NewRegistry()
if errors.Is(err, integration.ErrRequirements) {
t.Skip(err.Error())
}
require.NoError(t, err)

ps := []ocispecs.Platform{
platforms.MustParse("linux/amd64"),
Expand Down Expand Up @@ -7676,11 +7678,13 @@ func testAttestationDefaultSubject(t *testing.T, sb integration.Sandbox) {
requiresLinux(t)
c, err := New(sb.Context(), sb.Address())
require.NoError(t, err)
defer c.Close()

registry, err := sb.NewRegistry()
if errors.Is(err, integration.ErrRequirements) {
t.Skip(err.Error())
}
require.NoError(t, err)

ps := []ocispecs.Platform{
platforms.MustParse("linux/amd64"),
Expand Down Expand Up @@ -7813,11 +7817,13 @@ func testAttestationBundle(t *testing.T, sb integration.Sandbox) {
requiresLinux(t)
c, err := New(sb.Context(), sb.Address())
require.NoError(t, err)
defer c.Close()

registry, err := sb.NewRegistry()
if errors.Is(err, integration.ErrRequirements) {
t.Skip(err.Error())
}
require.NoError(t, err)

ps := []ocispecs.Platform{
platforms.MustParse("linux/amd64"),
Expand Down Expand Up @@ -7962,11 +7968,13 @@ func testSBOMScan(t *testing.T, sb integration.Sandbox) {
requiresLinux(t)
c, err := New(sb.Context(), sb.Address())
require.NoError(t, err)
defer c.Close()

registry, err := sb.NewRegistry()
if errors.Is(err, integration.ErrRequirements) {
t.Skip(err.Error())
}
require.NoError(t, err)

p := platforms.MustParse("linux/amd64")
pk := platforms.Format(p)
Expand Down Expand Up @@ -8238,11 +8246,13 @@ func testSBOMScanSingleRef(t *testing.T, sb integration.Sandbox) {
requiresLinux(t)
c, err := New(sb.Context(), sb.Address())
require.NoError(t, err)
defer c.Close()

registry, err := sb.NewRegistry()
if errors.Is(err, integration.ErrRequirements) {
t.Skip(err.Error())
}
require.NoError(t, err)

p := platforms.DefaultSpec()
pk := platforms.Format(p)
Expand Down Expand Up @@ -8402,11 +8412,13 @@ func testSBOMSupplements(t *testing.T, sb integration.Sandbox) {
requiresLinux(t)
c, err := New(sb.Context(), sb.Address())
require.NoError(t, err)
defer c.Close()

registry, err := sb.NewRegistry()
if errors.Is(err, integration.ErrRequirements) {
t.Skip(err.Error())
}
require.NoError(t, err)

p := platforms.MustParse("linux/amd64")
pk := platforms.Format(p)
Expand Down

0 comments on commit 3b0aa69

Please sign in to comment.