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

feat(remotek6):Add remote test scripts

Open bearrito opened this issue 1 year ago • 1 comments

What does this PR do?

Adds support for remote test scripts

Why is it important?

Addressing https://github.com/testcontainers/testcontainers-go/issues/2246

How to test this PR

Run the unit tests.

I'm dogfooding the existing scripts from within the git repo iteself. I think this is a good idea because we will know the existing scripts pass/fail, then if they change it will be automatically reflected in the remote tests.

I don't have a server setup with basic auth for me to test the auth portion.

bearrito avatar Mar 13 '24 19:03 bearrito

Deploy Preview for testcontainers-go ready!

Name Link
Latest commit fead61a80085a9fa601a540667d97d64f27a6332
Latest deploy log https://app.netlify.com/sites/testcontainers-go/deploys/660d70cb9ac1210008f7b2c3
Deploy Preview https://deploy-preview-2350--testcontainers-go.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Mar 13 '24 19:03 netlify[bot]

In #2401 we added support for a io.Reader in the ContainerFile struct. I think we could leverage it in this module, changing the internals of the WithTestScript function to get the reader. We could have a WithTestScriptReader function that receives the reader, and that reader is passed to the request's files. Finally, I'd change the existing option to invoke the reader with the file reader.

Wdyt?

mdelapenya avatar Mar 22 '24 12:03 mdelapenya

@mdelapenya No problem, I can do that.

bearrito avatar Mar 22 '24 14:03 bearrito

Updated to use reader API

bearrito avatar Mar 22 '24 17:03 bearrito

@mdelapenya I think I addressed all your comments.

bearrito avatar Mar 25 '24 16:03 bearrito