go-sftp icon indicating copy to clipboard operation
go-sftp copied to clipboard

Run tests in Docker container.

Open apapsch opened this issue 1 year ago • 4 comments

I am in the unfortunate circumstance of having to use a Windows machine for development. This change runs tests in a container. The test suite fails on Windows, but my target platform is not Windows, therefore I don't need to fix the code for that OS.

apapsch avatar Feb 14 '24 10:02 apapsch

I'm confused how this is helpful then? If you can't run the sftp server on your machine how does running them in a container help?

adamdecaf avatar Feb 14 '24 14:02 adamdecaf

The SFTP test server runs fine, it already runs in a Linux container. Executing go test using the native Windows go binary is the problem. The test suite fails. Here is the test suite failure (just in case): fail.log. This patch runs go test in a Linux container, removing Windows from the equation.

apapsch avatar Feb 14 '24 15:02 apapsch

We want the client to function on Windows as similar to how it works on Linux/Mac so avoiding Window in tests doesn't help fix the issue. Failures on windows are probably bugs you'll run into anyway.

It looks like Github Windows runners support Docker so we can enable tests there.

adamdecaf avatar Feb 14 '24 15:02 adamdecaf

Can you help figure out how to run tests on Windows? I'm not familiar so trying to find the right command so the sftp image boots up is confusing.

https://github.com/moov-io/go-sftp/pull/189

adamdecaf avatar Feb 14 '24 17:02 adamdecaf