Pages tagged "testing"
Golang Testing time.Now
Testing time objects can be a pain. Some languages offer some helpful libraries that can help like VCR in Ruby. Other tools to help are mocking libraries to where you can mock and stub out the time calls to what you want. In golang there is another way to help and that is using dependency injection to help make testing easier.
Momentjs Date Mutation
If you’ve ever had to work with a lot of date logic in javascript you’ve likely used or at least seen Momentjs. It can be convenient for moving dates to other timezones or date math. I ran into another today I learned moment trying to write some tests in Jest while using moment to handle dates in test setup and fixtures.
Ansible Galaxy – Testing Roles with Test Kitchen
Ansible is a provisioning tool to easily help you get your infrastructure
under control. One of the key elements in Ansible is a role
. There are public
roles to get you started quickly with Ansible over at Ansible Galaxy. One
thing Ansible is sort of lacking is a strong testing approach for open source
roles.