Commit graph

5002 commits

Author SHA1 Message Date
Russell Seymour
5af16fad70 Merge pull request #8 from chef/russellseymour/resource-groups
Added support for checking Resource Group resources
2017-02-20 14:03:12 +00:00
Russell Seymour
9c9bb27540 Checkstyle Fixes
Signed-off-by: Russell Seymour <russell.seymour@turtlesystems.co.uk>
2017-02-20 13:57:00 +00:00
Russell Seymour
7a6cbff579 Added support for checking the resource group resources
Fixes #6

Signed-off-by: Russell Seymour <russell.seymour@turtlesystems.co.uk>
2017-02-20 13:51:41 +00:00
Russell Seymour
c2bc6dc40d Merge pull request #7 from chef/russellseymour/vm-resources
Added more VM resource controls
2017-02-20 10:08:24 +00:00
Russell Seymour
d5a9a39a00 Updated README for the new resources
Fixes #5

Signed-off-by: Russell Seymour <russell.seymour@turtlesystems.co.uk>
2017-02-20 10:05:40 +00:00
Russell Seymour
c8378d513e Added more resources that can be tested
Updated the example to show how to use them
Refactored the way in which the VM is retrieved

Signed-off-by: Russell Seymour <russell.seymour@turtlesystems.co.uk>
2017-02-20 09:52:28 +00:00
Russell Seymour
b2ce9c3f35 Removing obsolete dummy credential file for Azure 2017-02-17 18:42:35 +00:00
Russell Seymour
0f7a58153a Merge pull request #4 from chef/russellseymour/data-disks
Testing Machine data disks
2017-02-17 18:41:53 +00:00
Russell Seymour
3913e0e661 Modified tests to only run lint checks 2017-02-17 18:40:23 +00:00
Russell Seymour
7c7d557c3a Update .travis.yml
Changed layout so that all ENV vars are set in one build
2017-02-17 18:20:51 +00:00
Russell Seymour
993847c941 Added environment variables to travis.yml
Fixed `inspec check` violations

Signed-off-by: Russell Seymour <russell.seymour@turtlesystems.co.uk>
2017-02-17 17:39:10 +00:00
Russell Seymour
93f5dcd072 Corrected rubocop offences
Signed-off-by: Russell Seymour <russell.seymour@turtlesystems.co.uk>
2017-02-17 17:25:30 +00:00
Russell Seymour
2e55c32ee0 Added travis configuration file
Signed-off-by: Russell Seymour <russell.seymour@turtlesystems.co.uk>
2017-02-17 17:18:00 +00:00
Russell Seymour
37fc5e6130 Added new resource to test data disks
Fixes #1

Signed-off-by: Russell Seymour <russell.seymour@turtlesystems.co.uk>
2017-02-17 17:06:15 +00:00
Viktor Yakovlyev
88f6e5f716 update readme with new integration test behaviour
Signed-off-by: Viktor Yakovlyev <Viktor.Y@D2L.com>
2017-02-16 15:28:30 -05:00
Viktor Yakovlyev
5d6900fb86 add cleanup by default on integration tests
Signed-off-by: Viktor Yakovlyev <Viktor.Y@D2L.com>
2017-02-16 15:25:27 -05:00
Chris Redekop
6a098470fd Merge pull request #16 from chef/issue13
Fixes #13, return of false values for ec2#exists
2017-02-16 15:05:30 -05:00
Viktor Yakovlyev
bdd86542b0 add negative case test for exists?
Signed-off-by: Viktor Yakovlyev <Viktor.Y@D2L.com>
2017-02-16 14:33:21 -05:00
Viktor Yakovlyev
f0773ccc75 fix tests
Signed-off-by: Viktor Yakovlyev <Viktor.Y@D2L.com>
2017-02-16 14:27:35 -05:00
Viktor Yakovlyev
46919d7155 Merge branch 'issue13' of https://github.com/chef/inspec-aws into issue13 2017-02-16 14:03:08 -05:00
Viktor Yakovlyev
6ee43f8fb5 Adding check for ec2 instance existence. #13
Signed-off-by: Viktor Yakovlyev <Viktor.Y@D2L.com>
2017-02-16 14:02:44 -05:00
Chris Redekop
3cad7d1e78 #13, Ec2#exists returns false positives
Signed-off-by: Chris Redekop <chris.redekop@d2l.com>
2017-02-16 14:02:44 -05:00
Adam Leff
bf07a58ed7 Merge pull request #1489 from chef/adamleff/doc-fix
Doc fix for SourceReaders::InspecReader
2017-02-15 09:28:39 -05:00
Adam Leff
cb53b8360e Merge pull request #1487 from chef/ap/packages-redhat
Packages resource support for RedHat
2017-02-15 09:27:43 -05:00
Alex Pop
88975bff2a Switch package resource to os.redhat detection and use two spaces as fileds delimited
Signed-off-by: Alex Pop <apop@chef.io>
2017-02-15 11:07:10 +00:00
Alex Pop
fae96f6249 Add RedHat support for packages resource
Fix dpkg trimming of first line
Signed-off-by: Alex Pop <apop@chef.io>
2017-02-15 11:07:10 +00:00
Adam Leff
29e0dbebd1 Merge pull request #1490 from chef/dr/tutorial-link
create inspec.io/tutorial.html
2017-02-14 15:01:50 -05:00
Christoph Hartmann
892d11aef2 Merge pull request #14 from chef/issue11
Add unit tests for EC2 resource
2017-02-14 18:40:37 +01:00
Christoph Hartmann
1117020d52 update readme 2017-02-14 18:38:19 +01:00
Chris Redekop
9d8afa5440 add tests for :instance and :exists
Signed-off-by: Chris Redekop <chris.redekop@d2l.com>
2017-02-14 18:38:15 +01:00
Chris Redekop
1842cc2fd9 add another id-method test
Signed-off-by: Chris Redekop <chris.redekop@d2l.com>
2017-02-14 18:38:11 +01:00
Chris Redekop
5d00aac059 Add unit test skeleton with Minitest dependency
Signed-off-by: Chris Redekop <chris.redekop@d2l.com>
2017-02-14 18:38:06 +01:00
Dominik Richter
34247f7c16 Merge pull request #1475 from chef/adamleff/show-target-in-shell
Provide target info on shell invocation
2017-02-14 15:06:52 +01:00
Adam Leff
bc7db89d70 Provide target info on shell invocation
When in inspec shell, you need to type the `help` command to find out info
about your target system. This info would be super helpful right out of the
gate so users have confidence that they're targeting the correct system.

The target info is still available via the `help` command as it always has
been, as well.

Signed-off-by: Adam Leff <adam@leff.co>
2017-02-14 14:46:47 +01:00
Dominik Richter
45e3016acb create inspec.io/tutorial.html
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2017-02-14 04:18:16 +01:00
Adam Leff
7e64c99738 Doc fix for SourceReaders::InspecReader
The inline docs for SourceReaders::InspecReader#new state that it takes
a SourceReader object for the target... but we're trying to create the
SourceReader object! It actually takes a FileProvider object that is
capabile of listing files for the given profile and reading them.

Signed-off-by: Adam Leff <adam@leff.co>
2017-02-13 13:19:22 -05:00
Adam Leff
d0bc085412 Generate default profile names, fix bug when using two-or-more flat profiles
When running InSpec with multiple profiles, and two or more of the profiles
are read in using the "Flat" SourceReader (i.e. they are not actual profiles
with a metadata file like inspec.yml, but rather just a folder containing
.rb files with controls and tests in them), InSpec would throw a NilClass
error when building the necessary objects for the formatter.

The cause was in `#profile_contains_example` in the formatter code which
checks to see if the profile name is the same as the profile_id in the given
example. However, if both of those were nil, it would potentially match the
wrong Flat-read profile.

This change fixes this in two ways: refusing to match if the profile name
or example profile ID is nil, and adding a default name to a profile if
it doesn't have a title or name. This will solve the matching issue and also
clean up the formatter output so users can more easily tell what tests
are from which profile/path.

Signed-off-by: Adam Leff <adam@leff.co>
2017-02-13 13:07:41 -05:00
Russell Seymour
8d6b42fa5e Added example of using the azure_vm_datadisks in a control
Signed-off-by: Russell Seymour <russell.seymour@turtlesystems.co.uk>
2017-02-13 13:53:07 +00:00
Dominik Richter
09cc7c3a7e Merge pull request #1482 from chef/adamleff/add-crontab-resource
Adding new crontab resource
2017-02-10 20:53:17 +01:00
Adam Leff
417b791baa Adding new crontab resource
The crontab resource parses a particular user's crontab file into
individual entries and allows the user to assert information about
each entry as needed.

Signed-off-by: Adam Leff <adam@leff.co>
2017-02-10 09:33:31 -05:00
Dominik Richter
4daa4d06c0 1.14.1 2017-02-10 14:13:12 +01:00
Dominik Richter
514a255c52 Merge pull request #1484 from chef/ap/fix-packages-check
Skip packages resource for unsupported OS
2017-02-10 14:03:34 +01:00
Alex Pop
ce927e657a Skip packages resource for unsupported OS
Signed-off-by: Alex Pop <apop@chef.io>
2017-02-10 10:34:01 +00:00
Viktor Yakovlyev
8b026d48ea Adding check for ec2 instance existence. #13
Signed-off-by: Viktor Yakovlyev <Viktor.Y@D2L.com>
2017-02-09 16:31:24 -05:00
Russell Seymour
8e7a600dcb Adding support for data disks using Inspec filter
Signed-off-by: Russell Seymour <russell.seymour@turtlesystems.co.uk>
2017-02-09 16:47:46 +00:00
Adam Leff
b121040516 Merge pull request #1481 from chef/dr/maintainers-alexpop
add Alex Pop to the list of maintainers
2017-02-09 09:55:35 -05:00
Dominik Richter
0153b571a3 add Alex Pop to the list of maintainers
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2017-02-09 15:42:36 +01:00
Dominik Richter
49beef6aa3 Merge pull request #1480 from chef/dr/maintainers-jason
remove Jason Reed from the list of maintainers
2017-02-09 15:41:01 +01:00
Dominik Richter
aabd23e69a remove Jason Reed from the list of maintainers
Thank you for all your support!!

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2017-02-09 14:45:03 +01:00
Dominik Richter
c3bfca14f7 Merge pull request #1479 from chef/adamleff/add-maintainer
Add Adam Leff as a maintainer
2017-02-09 10:36:38 +01:00