Skip to content

appveyor test #1220

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 8 commits into from
Closed

appveyor test #1220

wants to merge 8 commits into from

Conversation

Rob-Hague
Copy link
Collaborator

No description provided.

@Rob-Hague
Copy link
Collaborator Author

[00:03:30]  [testcontainers.org 00:00:00.21] Connected to Docker:
[00:03:30]    Host: npipe://./pipe/docker_engine
[00:03:30]    Server Version: 19.03.8
[00:03:30]    Kernel Version: 10.0 17763 (17763.1.amd64fre.rs5_release.180914-1434)
[00:03:30]    API Version: 1.40
[00:03:30]    Operating System: Windows Server 2019 Datacenter Version 1809 (OS Build 17763.4737)
[00:03:30]    Total Memory: 5.86 GB
[00:03:30]  [testcontainers.org 00:00:00.44] Searching Docker registry credential in Auths
[00:03:30]  [testcontainers.org 00:00:00.45] Searching Docker registry credential in Auths
[00:03:30]  [testcontainers.org 00:00:00.52] Searching Docker registry credential in CredHelpers
[00:03:30]  [testcontainers.org 00:00:00.52] Searching Docker registry credential in CredsStore
[00:03:30]  [testcontainers.org 00:00:01.57] Docker registry credential https://index.docker.io/v1/ not found
[00:03:30]  [testcontainers.org 00:00:07.28] Docker image alpine:latest created
[00:03:30]  [testcontainers.org 00:00:07.37] Pattern ^(.+)\/\.idea added to the regex cache
[00:03:30]  [testcontainers.org 00:00:07.37] Pattern ^([\\\/]?(\.idea\b|$)) added to the regex cache
[00:03:30]  [testcontainers.org 00:00:07.37] Pattern ^([\\\/]?((.+)\/\.vs\b|$)) added to the regex cache
[00:03:30]  [testcontainers.org 00:00:07.37] Pattern ^([\\\/]?(\.vs\b|$)) added to the regex cache
[00:03:30]  [testcontainers.org 00:00:07.37] Pattern ^([\\\/]?(\.dockerignore\b|$)) added to the regex cache
[00:03:30]  [testcontainers.org 00:00:07.37] Pattern ^([\\\/]?(Dockerfile\b|$)) added to the regex cache
[00:03:30]  [testcontainers.org 00:01:06.41] The command '/bin/sh -c apk update && apk upgrade --no-cache &&     apk add --no-cache syslog-ng &&     apk add --no-cache openssh &&     apk add --no-cache openssh-server-pam &&     dos2unix /etc/ssh/* &&     chmod 400 /etc/ssh/ssh*key &&     sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config &&     sed -i 's/#LogLevel\s*INFO/LogLevel DEBUG3/' /etc/ssh/sshd_config &&     echo 'HostKey /etc/ssh/ssh_host_rsa_key' >> /etc/ssh/sshd_config &&     chmod 646 /etc/ssh/sshd_config &&     apk add --no-cache sudo &&     addgroup sudo &&     echo 'root ALL=(ALL) ALL' > /etc/sudoers &&     echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers &&     adduser -D sshnet &&     passwd -u sshnet &&     echo 'sshnet:ssh4ever' | chpasswd &&     dos2unix /home/sshnet/.ssh/* &&     chown -R sshnet:sshnet /home/sshnet &&     chmod -R 700 /home/sshnet/.ssh &&     chmod -R 644 /home/sshnet/.ssh/authorized_keys &&     adduser -D sshnetadm &&     passwd -u sshnetadm &&     echo 'sshnetadm:ssh4ever' | chpasswd &&     addgroup sshnetadm sudo &&     dos2unix /opt/sshnet/* &&     apk add --no-cache shadow &&     apk --no-cache add busybox-extras &&     apk add --no-cache procps' returned a non-zero code: 4294967295: failed to shutdown container: container 3023574af273a6391aa71d73559aade093c281d9177c0c0b665bbf7a4baedea4 encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110): subsequent terminate failed container 3023574af273a6391aa71d73559aade093c281d9177c0c0b665bbf7a4baedea4 encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110)

[00:03:30] 
[00:03:30] 
[00:03:30]   Failed Multifactor_PublicKey_Connect_Then_Reconnect
[00:03:30]   Error Message:
[00:03:30]    Assembly Initialization method Renci.SshNet.IntegrationTests.TestInitializer.Initialize threw exception. System.InvalidOperationException: Docker image renci-ssh-tests-server-image:latest has not been created.. Aborting test execution.
[00:03:30]   Stack Trace:
[00:03:30]       at DotNet.Testcontainers.Clients.DockerImageOperations.BuildAsync(IImageFromDockerfileConfiguration configuration, ITarArchive dockerfileArchive, CancellationToken ct)
[00:03:30]    at DotNet.Testcontainers.Clients.TestcontainersClient.BuildAsync(IImageFromDockerfileConfiguration configuration, CancellationToken ct)
[00:03:30]    at DotNet.Testcontainers.Images.FutureDockerImage.UnsafeCreateAsync(CancellationToken ct)
[00:03:30]    at DotNet.Testcontainers.Images.FutureDockerImage.CreateAsync(CancellationToken ct)
[00:03:30]    at Renci.SshNet.IntegrationTests.TestsFixtures.InfrastructureFixture.InitializeAsync() in C:\projects\ssh-net\test\Renci.SshNet.IntegrationTests\TestsFixtures\InfrastructureFixture.cs:line 45
[00:03:30]    at Renci.SshNet.IntegrationTests.TestInitializer.Initialize(TestContext context) in C:\projects\ssh-net\test\Renci.SshNet.IntegrationTests\TestInitializer.cs:line 10
[00:03:30] 

@Rob-Hague
Copy link
Collaborator Author

[00:03:29]  [testcontainers.org 00:00:58.43] The command '/bin/sh -c apk update && apk upgrade --no-cache' returned a non-zero code: 4294967295: failed to shutdown container: container b77f78c6c10d610f894bc57bcb346d6d2210bf773b79e11ec026e84dd3c78d6b encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110): subsequent terminate failed container b77f78c6c10d610f894bc57bcb346d6d2210bf773b79e11ec026e84dd3c78d6b encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110)

Per here, appveyor VS2022 image is running Docker Desktop 2.2.0.5 using LCOW (Linux containers on Windows). LCOW is deprecated and no longer exists in later versions. moby/moby#36682 seems to correlate with the errors here.

Until appveyor updates the docker version on the windows images, we might need a linux image in order to get the integration tests running.

@Rob-Hague
Copy link
Collaborator Author

Rob-Hague commented Oct 21, 2023

Ok well the integration tests are running now, albeit with lots of failures (hopefully #1187 and #922 have fixes for some of them).

Of course, the .NET Framework unit tests can't run on linux (doh). So maybe we do in fact need to run both a windows and a linux image, where the windows image runs the unit tests on net462;net6.0;net7.0 but no integration tests, and the linux image runs the unit tests without net462 but also runs the integration tests.

@Rob-Hague
Copy link
Collaborator Author

I think the tests run serially anyway so I don't think the last commit does anything.

The tests are pretty much all failing on the SetUp or TearDown methods either with e.g.

TestCleanup method Renci.SshNet.IntegrationTests.AuthenticationTests.TearDown threw exception. Renci.SshNet.Common.SshConnectionException: The server response does not contain an SSH identification string.

or

TestCleanup method Renci.SshNet.IntegrationTests.AuthenticationTests.TearDown threw exception. System.Net.Sockets.SocketException: Connection reset by peer.

Are the connections being re-established too quickly?

@Rob-Hague
Copy link
Collaborator Author

I'll come back to this another time (when I have an idea of what to try next...). Happy for anyone to take over.

@Rob-Hague Rob-Hague closed this Oct 24, 2023
@WojciechNagorski
Copy link
Collaborator

I will take care of it. I know how to run integration test in GitHub action.

@Rob-Hague
Copy link
Collaborator Author

Great. Hopefully you don't have the same issues (I think the problem could be port reuse)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants