Comments (3)
Hmm, just by looking at this it seems that there are two things going on.
The first is that the output of your command is going to stderr, but the streams are definitely kept separate when attaching to the docker logs (see here), so I think this might actually a weird thing with the command you're running. Can you try running it directly in your container again and redirecting stderr to a file (command 2> stderr.txt
) and see if it's printing to the wrong (or at least unexpected) stream?
The second thing is that you're using a simple matching string for the expectedOutput here, but these are actually interpreted by the testing framework as regexes. This means that to actually match the string "1.14.17"
, you'll need to use something like expectedOutput: [".*1\.14\.17.*"]
if you expect there to be surrounding output. I know this is a bit of a weird UX, and something I'd like to improve.
from container-structure-test.
@goffinf What version of python do you have installed?
If you're using a python version <3.4 then aws --version
will print to stderr, however more recent versions should print to stdout.
from container-structure-test.
I don't think we need to alter the logic for the test infrastructure. I think there are 3 suitable workarounds for the fact that aws --version behaves in an unexpected way.
I'm going to close "won't fix," but if you disagree please reopen with discussion.
from container-structure-test.
Related Issues (20)
- Testing the existence of a directory is very slow
- Release process: use github actions and release to bazel central registry HOT 1
- container-structure-test behaves differently on two identical machines HOT 2
- Add Expected Log validation HOT 3
- How to use container_structure_test with oci_image on MacOS
- No Release asset checksums (sha256) since Release v1.11.0
- Add platform parameter to support testing multi-platform images
- Multiple outputs (i.e. `text` and `json`) HOT 1
- New Testcontainers driver HOT 3
- Env var expansion feature in commandTests output assertions
- Add support to containerRunOptions for --cap-drop
- Security Policy violation SECURITY.md HOT 107
- Update documentation regarding Bazel and Docker TCP connections
- Binaries for v1.16.1? HOT 2
- Unable use v1.16.1 with bzlmod
- How to mount a config file? HOT 1
- Hash for linux_i386 is missing
- Add Darwin ARM64 package type HOT 7
- Add ability to document container in markdown HOT 1
- Add a metadata test to test the base image used in the image
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from container-structure-test.