Skip to content
This repository has been archived by the owner on Feb 18, 2022. It is now read-only.

(PRE-104) add_node_to_puppetdb spec helper #153

Merged
merged 2 commits into from
Aug 8, 2016

Conversation

johnduarte
Copy link
Contributor

This commit refactors the logic to add nodes in puppetdb in the
spec_helper_integration file into its own helper method. This
change will allow individual spec tests to add nodes for their
discrete use cases.

Specifically, this will allow for the addition of nodes that will
then be deactivated without negatively impacting the database for
other tests.

This commit refactors the logic to add nodes in puppetdb in the
spec_helper_integration file into its own helper method. This
change will allow individual spec tests to add nodes for their
discrete use cases.

Specifically, this will allow for the addition of nodes that will
then be deactivated without negatively impacting the database for
other tests.
add_node_to_puppetdb(test_node, 'production')
on master, puppet('node', 'deactivate', test_node)

it 'should skip inactive nodes by default' do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we're explicitly using the flag here, which i also believe is the default. is this as intended?

This commit adds a test for the `--skip-inactive-nodes` flag.

It tests that an inactive node is not included by default when the
flag is used.

A placeholder for the negative case `--no-skip-inactive-nodes` is
also included. This test is marked as pending until PRE-115 is resolved.
@er0ck
Copy link
Contributor

er0ck commented Jul 25, 2016

this LGTM, but let's wait until the release to merge...

@seangriff
Copy link

Tested this out and it works fine, right up to the last case which fails because of PUP-115, marked pending.

+1 for merge

@er0ck er0ck merged commit d35deaa into puppetlabs-toy-chest:master Aug 8, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants