marcwrobel / ansible-collection-assertions Goto Github PK
View Code? Open in Web Editor NEWA reusable collection of assertions for writing Ansible Molecule tests.
License: MIT License
A reusable collection of assertions for writing Ansible Molecule tests.
License: MIT License
The README of the collection is broken on Ansible Galaxy :
In order to improve assertions readability some variable must be renamed:
path
-> with_path
(in assert_that_file
, assert_that_path
)name
-> with_name
(in assert_that_service
)multiline_for_content_matching
-> using_multiline_for_content_matching
(in assert_that_file
)ignorecase_for_content_matching
-> using_ignorecase_for_content_matching
(in assert_that_file
)strict_version_parsing
-> using_strict_version_parsing
assert_that_distribution
role fail message is wrong : there is a missing comma.
Instead of displaying Expecting one of [ Debian, Debian 10, Debian 10 ] to be in [ OS 1, OS 2, OS 3 ], but none are.
it displays Expecting one of [ Debian, Debian 10 Debian 10 ] to be in [ OS 1, OS 2, OS 3 ], but none are.
.
Currently making assertions on files and files content require both the role assert_that_file
and assert_that_path
:
- name: 'Assert that /tmp/test exists, is a file, have mode 0640 and belongs to root:root'
include_role:
name: 'marcwrobel.assertions.assert_that_path'
vars:
path: '/tmp/test'
has_type: 'file'
has_mode: '0640'
has_owner: 'root'
has_group: 'root'
- name: 'Assert that /tmp/test is Ansible managed'
include_role:
name: 'marcwrobel.assertions.assert_that_file'
vars:
path: '/path/to/file'
has_content_matching: '^# Ansible managed'
But making assertions on files is one of the most common type of assertion. In order to reduce the code needed for that it should be possible to make exists
, has_type
, has_mode
, has_owner
and has_group
assertions with assert_that_file
role.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.