github.com/kaisenlinux/docker.io@v0.0.0-20230510090727-ea55db55fac7/debian/patches/test--cli-skip-network-tests.patch (about)

     1  From: Dmitry Smirnov <onlyjob@debian.org>
     2  Last-Update: 2020-11-27
     3  Forwarded: not-needed
     4  Description: cli/command: Skip network tests
     5   Interestingly, the last time I tried, only the test
     6   'TestRunBuildFromGitHubSpecialCase' failed,  and it failed only
     7   for the armel architecture. Which makes absolutely no sense,
     8   given that it's supposed to fail when there's no network, and
     9   it should have nothing to do with the architecture.
    10   .
    11   Anyway. Let's disable this test.
    12   .
    13   Build error below:
    14   .
    15   === FAIL: cli/command/image TestRunBuildFromGitHubSpecialCase (0.10s)
    16   Error: unable to prepare context: unable to 'git clone' to temporary context directory: error fetching: fatal: unable to access 'https://github.com/docker/for-win/': Couldn't connect to server
    17   : exit status 128
    18       build_test.go:136: assertion failed: expected error to contain "docker-build-git", got "unable to prepare context: unable to 'git clone' to temporary context directory: error fetching: fatal: unable to access 'https://github.com/docker/for-win/': Couldn't connect to server\n: exit status 128"
    19  
    20  Index: docker/cli/cli/command/image/build_test.go
    21  ===================================================================
    22  --- docker.orig/cli/cli/command/image/build_test.go
    23  +++ docker/cli/cli/command/image/build_test.go
    24  @@ -125,6 +125,7 @@ COPY data /data
    25   // TODO: test "context selection" logic directly when runBuild is refactored
    26   // to support testing (ex: docker/cli#294)
    27   func TestRunBuildFromGitHubSpecialCase(t *testing.T) {
    28  +t.Skip("DM - disabled due to network access")
    29   	defer env.Patch(t, "DOCKER_BUILDKIT", "0")()
    30   	cmd := NewBuildCommand(test.NewFakeCli(&fakeClient{}))
    31   	// Clone a small repo that exists so git doesn't prompt for credentials