You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your spike related to a problem or idea? Please describe.
Serverspec has no integration with Ansible - inventory is parsed by additional Ruby code (spec_helper.rb)
Running remote commands (in order to gather facts) inside a test is not supported. Instead "external" methods are used (which is not convenient) which use lower level calls (e.g. Specinfra.backend.run_command or Net::SSH.start).
Tests are not always concise. When you need to perform any processing on the output (e.g. stdout.force_encoding('UTF-8')), you have to use RSpec (longer) syntax.
Serverspec is Ruby based which requires knowing additional language and having additional developer tools (VS Code extensions, linting rules).
Describe the outcome you'd like
Comparison of tools: ServerSpec vs Testinfra based on real life case (PostgreSQL tests).
What is the reason or source for the spike
It is supposed that using Testinfra instead of Serverspec can give us some significant benefits.
Is your spike related to a problem or idea? Please describe.
Specinfra.backend.run_command
orNet::SSH.start
).stdout.force_encoding('UTF-8')
), you have to use RSpec (longer) syntax.Describe the outcome you'd like
What is the reason or source for the spike
Additional context
Example of migration from ServerSpec to Testinfra:
freedomofpress/securedrop#1616
Molecule uses Testinfra as the default verifier (Serverspec is also available), see docs.
Additional info
https://testinfra.readthedocs.io/en/latest/
https://dev.to/koh_sh/using-testinfra-with-ansible-4n7b
Ansible integration
https://testinfra.readthedocs.io/en/latest/backends.html#ansible
https://testinfra.readthedocs.io/en/latest/modules.html#ansible
DoD checklist
The text was updated successfully, but these errors were encountered: