Commit graph

1660 commits

Author SHA1 Message Date
Clinton Wolfe
f59497d982 Don't open a new train connect, and make an issue for improving helper support
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-08-26 13:12:30 -04:00
Clinton Wolfe
fffb776982 Add newline
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-08-22 21:53:02 -04:00
Clinton Wolfe
d462ac3de5 Convert runner api script layout ot heredoc
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-08-22 21:51:50 -04:00
Clinton Wolfe
1f49ae4046 Skip runner API tests on windows
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-08-19 18:15:50 -04:00
Clinton Wolfe
cc4aa16212 Add test framework to run Runner API input tests
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-08-19 13:51:51 -04:00
Clinton Wolfe
8dc350bc6c
Add a Postfix-specific configuration testing resource (#4378)
Add a Postfix-specific configuration testing resource
2019-08-19 12:38:17 -04:00
Ryan Davis
4b3f11697d Removing ParallelTest so as to not encourage anyone from using it.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-08-09 16:17:13 -07:00
Ryan Davis
1266a65f28 Moved the osx? guard below minitest/autorun.
I didn't hit this because I use `minitest` to run my tests, not `m`.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-08-09 16:16:26 -07:00
David Gasper
ee2806a342 Fix RuboCop issues
Signed-off-by: David Gasper <dmgasper@osuosl.org>
2019-08-08 14:32:19 -07:00
David Gasper
52ae5e434b Add docs and unit tests, remove .travis.yml
Signed-off-by: David Gasper <dmgasper@osuosl.org>
2019-08-08 13:54:35 -07:00
Clinton Wolfe
95e6bcb317
Modified DarwinGroup to collect all users properly. (#4343)
group resource: Modified DarwinGroup to collect all users properly on macos
2019-08-08 11:55:48 -04:00
Clinton Wolfe
c28dd8f9ec
Add startuser windows service (#4363)
Add startuser windows service
2019-08-08 11:32:39 -04:00
Ryan Davis
374e365c02 Modified DarwinGroup to collect all users properly.
I noticed that my profile targeting group "staff" on OSX wasn't
returning *me*. I'm awesome! So that seemed wrong. And it turns out it
is wrong. We were not collecting any users whose primary group was
that group. (almost all regular users are in group staff and they're
all missing).

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-08-07 20:27:13 -07:00
Mendy Baitelman
4d990865a1 Add to mock_loader
Signed-off-by: Mendy Baitelman <mendy@baitelman.com>
2019-08-06 19:44:02 -07:00
Mendy Baitelman
988357aad1 Fix tests
Signed-off-by: Mendy Baitelman <mendy@baitelman.com>
2019-08-06 18:58:03 -07:00
Ryan Davis
d295455df6 Fix license functional tests when run on buildkite.
BK currently runs our tests on ruby:X.Y-stretch docker images, which
use root. This puts license files it /etc/chef instead of the current
user's home and broke our tests.

This adds cleanup to /etc/chef AND checks both locations, so it should
continue to work even if we switch to docker images with non-root users.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-08-06 15:50:01 -07:00
Ryan Davis
55f2747ee1 Remove timebombs from 2 functional license tests.
These were put in place because they pass locally and fail on
buildkite. We didn't care at the time, but now we should investigate.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-08-06 15:02:37 -07:00
Ryan Davis
b570e0cc74 Bump skipped license tests until 8/16.
I've got this under debug in docker but this is a problem on the
license_acceptance gem on BK, not with inspec. And it is blocking a
release, so I'm bumping this out 2 weeks.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-07-31 16:44:49 -07:00
Ryan Davis
99638d8de9 Remove timebomb on skip_until.
It has been valuable and should push up to minitest.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-07-31 12:24:57 -07:00
Clinton Wolfe
88898ce7a9 Linting
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-07-30 13:42:24 -04:00
Clinton Wolfe
f00e741999 PR feedback
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-07-30 13:38:02 -04:00
Clinton Wolfe
c03862fe7b Code climate updates
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-07-30 13:38:02 -04:00
Clinton Wolfe
4f6d296a22 The error case in which the path does not exist
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-07-30 13:38:02 -04:00
Clinton Wolfe
860d21a370 Test for ./
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-07-30 13:38:02 -04:00
Clinton Wolfe
31bedf7b37 Empty-string edge case
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-07-30 13:38:02 -04:00
Clinton Wolfe
fab58b590e Combo relative test in place
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-07-30 13:38:02 -04:00
Clinton Wolfe
e9ef8e25a3 Deep dependency works
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-07-30 13:38:02 -04:00
Clinton Wolfe
80241ec971 Passing basic test harness
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-07-30 13:38:02 -04:00
Clinton Wolfe
c257763de6 Linting
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-07-30 13:38:02 -04:00
Clinton Wolfe
aa81012013 Rework tests to be fixture-based, not generated per-run
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-07-30 13:38:02 -04:00
Clinton Wolfe
12fcb24932 Experiment with git subrepo storage
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-07-30 13:36:20 -04:00
Clinton Wolfe
0e32d2429f Rename path_within_repo option to relative_path
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-07-30 13:36:20 -04:00
Clinton Wolfe
f1a892c857 Move existing git fixture profile to a directory for git-fetchers
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-07-30 13:36:20 -04:00
Clinton Wolfe
9c1fa967fd Rename profile_path to path_within_repo
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-07-30 13:36:20 -04:00
Jerry Aldrich
3e1d08cafe Add support for relative paths to the Git fetcher
This adds support for specifying a path to a profile in a Git repo.

For example, you could have a Git repo containing multiple profiles and
you want to specify a single one like below:

```yaml
depends:
  - name: profile-1
    git: https://github.com/myorg/all-my-profiles.git
    profile_path: profiles/my-specific-profile-1
  - name: profile-2
    git: https://github.com/myorg/all-my-profiles.git
    profile_path: profiles/my-specific-profile-2
```
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2019-07-30 13:36:20 -04:00
Ryan Davis
2d5fdabf86
Merge pull request #4337 from inspec/zenspider/remove-version-checking
Removed lib/inspec/utils/latest_version.rb and associated code.
2019-07-29 12:47:37 -07:00
Ryan Davis
3d6a4143a1 Removed lib/inspec/utils/latest_version.rb and associated code.
There is no reason why our tests should be failing because we deploy a
new version. That test shouldn't even be hitting the network for real.

Besides, the functionality has no place in our codebase. It's
functionality provided via `gem outdated` so why did we re-implement
it? And we expect most people to be running via omnibus, so they're
pinned to a specific version in the first place. Even if they updated,
they still couldn't run it and that would be more confusing.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-07-29 11:57:08 -07:00
Ryan Davis
1e2da6acc2 Moved another non-test to test/unit/mock/files
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-07-29 11:42:30 -07:00
Ryan Davis
4df8072665 These tests probably never passed.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-07-29 11:42:30 -07:00
Ryan Davis
be11d8898d Found more tests that we've probably never actually run.
*sigh*

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-07-29 11:42:30 -07:00
Clinton Wolfe
be91550343
windows_task: Fix handling of multiple triggers (#4242)
windows_task: Fix handling of multiple triggers
2019-07-29 13:00:16 -04:00
Ryan Davis
bcf3aa841c Skip failures from BK run.
Not sure why these failures come up in a unified run (versus my
running all test files separately). Might be test infection. Might be
environmental.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-07-24 18:59:01 -07:00
Ryan Davis
917a531a92 Skipped all failing tests on windows AT the failures site.
This activates a BUNCH of tests but keeps us green.

Whether these tests are valid or not is not being addressed here.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-07-24 18:09:08 -07:00
Ryan Davis
bd16b766fa Renamed do_shell_c to assert_shell_c to make failures point to the right place.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-07-24 18:06:25 -07:00
Ryan Davis
c6837a3915 Moved skip_windows! to top helper and extended date to end of next month.
Fixed up requires in v2/installer_test.rb so it sees the top helper.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-07-24 18:06:25 -07:00
Ryan Davis
6dfa1d8310 Um. No.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-07-24 18:06:25 -07:00
Ryan Davis
18ce4850f0 Initial pass to clean up functional testing wrt exit codes and output.
This should get windows tests running again? Hopefully? They're
running SO slowly on my vagrant box that I'm just pushing for now.
They're clean on the mac side.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-07-24 18:06:25 -07:00
Ryan Davis
bd79e9c895
Merge pull request #4316 from inspec/zenspider/fix-file-aws
Fix exceptions when resources are used with incompatible transports
2019-07-23 11:47:13 -07:00
Ryan Davis
7a1e1bb775
Merge pull request #4230 from yeoldegrove/sys_info
add resource sys_info.manufacturer and sys_info.model
2019-07-22 14:39:28 -07:00
Ryan Davis
7de549577c Return keys are really nice.
They make code more readable by visually separating different sections
of text.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-07-22 14:19:15 -07:00