Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F8391048
TESTING.md
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
TESTING.md
View Options
#
TESTING
#
TESTING
##
Prerequisites
Before
starting
any
test
,
you
should
make
sure
you
have
installed
the
Puppet
PDK
and
Bolt
,
also
Vagrant
and
VirtualBox
have
to
be
installed
for
acceptance
tests
.
Required
gems
are
installed
with
`
bundler
`
:
```
cd
puppet
-
icinga2
pdk
bundle
install
```
##
Validation
tests
Validation
tests
will
check
all
manifests
,
templates
and
ruby
files
against
syntax
violations
and
style
guides
.
Run
validation
tests
:
```
cd
puppet
-
icinga2
pdk
validate
```
##
Unit
tests
For
unit
testing
we
use
[
RSpec
].
All
classes
,
defined
resource
types
and
functions
should
have
appropriate
unit
tests
.
Run
unit
tests
:
```
cd
puppet
-
icinga2
pdk
test
unit
```
Or
dedicated
tests
:
```
pdk
test
unit
--
tests
=
spec
/
classes
/
icinga2_spec
.
rb
,
spec
/
classes
/
api_spec
.
rb
```
##
Acceptence
tests
With
integration
tests
this
module
is
tested
on
multiple
platforms
to
check
the
complete
installation
process
.
We
define
these
tests
with
[
Beaker
]
and
run
them
on
VMs
by
using
[
Vagrant
].
###
Run
tests
All
available
Beaker
acceptance
tests
are
listed
in
the
`
spec
/
acceptance
`
directory
.
Run
all
integraion
tests
:
```
cd
puppet
-
icinga2
pdk
bundle
exec
rake
beaker
```
Run
integration
tests
for
a
single
platform
:
```
cd
puppet
-
icinga2
pdk
bundle
exec
rake
beaker
:
centos
-
6
-
x64
```
To
choose
a
specific
Puppet
version
for
your
tests
set
the
environment
variable
,
e
.
g
.
```
BEAKER_PUPPET_AGENT_VERSION
=
"6.4.2"
```
Debugging
:
Does
not
destroy
a
virtual
machine
after
a
test
fails
is
done
by
setting
:
```
BEAKER_destroy
=
no
```
Logging
in
virtual
machine
,
e
.
g
.
```
cd
puppet
-
icinga2
pdk
bundle
exec
rake
beaker
:
ssh
:
centos
-
6
-
x64
```
or
in
the
default
machine
:
```
cd
puppet
-
icinga2
pdk
bundle
exec
rake
beaker
:
ssh
:
default
```
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Jun 4 2025, 6:37 PM (14 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3268777
Attached To
rSPICI Icinga 2 Puppet Module
Event Timeline
Log In to Comment