Understanding Infra and Smoke Testing: What’s the Best Approach?

0
2
Asked By TechWhiz99 On

I've been manually debugging for way too long, and now I want to dive into tools like Goss to make my sanity testing more efficient. Right now, I'm having trouble ensuring that my .env values properly translate into MySQL credentials. I've found that running dgoss against a running container doesn't seem to be an option. Does this mean I should be focusing more on testing the image rather than the container itself? I feel like I'm missing some foundational understanding of how to effectively approach infrastructure testing and automation, especially after reviewing the Goss documentation. Any insights would be appreciated!

2 Answers

Answered By CodeNinja42 On

It sounds like you're on the right path! When it comes to infra tests, the goal is typically to validate the image and its expected state, rather than trying to troubleshoot a live container. Goss is really meant for asserting known conditions post-build. I’d suggest layering your tests: start with build validation, then move to deploy validation, and finally check runtime aspects. This way, you won't have to mix everything into a single test.

Answered By BuildMaster88 On

Just to add, in a previous role, we dynamically created Dockerfiles that included various tools like Node and Python for CI runners. After building those containers, I used Python scripts to execute commands on the running container to ensure that packages and their versions were correct. Something simple like using podman exec for commands and parsing the output worked well for us!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.