Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(PUP-5122) Add acceptance test for direct puppet running from cache #4666

Merged

Conversation

whopper
Copy link
Contributor

@whopper whopper commented Feb 12, 2016

This commit adds the skeleton of an acceptance test for the scenario
where the server tells the agent to run from its cached catalog and
remediates local drift to file content.

Once further work has been done on actually retrieving file content
using content_uri (PUP-5114), this test will be expanded.

@whopper
Copy link
Contributor Author

whopper commented Feb 12, 2016

/cc @joshcooper @er0ck @seangriff, updated this to use Beaker's tk_helper to modify puppetserver.conf. Has passed running on centos - running it through Windows now.

@whopper whopper force-pushed the PUP-5122/acceptance/direct_puppet_cache branch 2 times, most recently from ef911e4 to 6a7d1b5 Compare February 12, 2016 21:31
@whopper
Copy link
Contributor Author

whopper commented Feb 12, 2016

Update: passed on Windows.

Strange note: originally I was running puppet agent -t --static_catalogs... (which is unnecessary). This didn't affect the run in Linux, but in Windows resulted in Error: Could not parse application options: invalid option: --static_catalogs. I used the same SHA and SUITE_VERSION on both platforms. I don't think this matters, but I thought I'd point it out!

@er0ck
Copy link
Contributor

er0ck commented Feb 12, 2016

created a ticket for the non-exposed --static-catalogs option:
https://tickets.puppetlabs.com/browse/PUP-5896

@@ -0,0 +1,112 @@
test_name "PUP-5122: Puppet remediates local drift using code_id and content_uri"
Copy link
Contributor

Choose a reason for hiding this comment

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

FYI @ all
test_names and steps should all have blocks (do end most of the time), moving forward. this helps beaker with indentation and beaker.next with reporting and other user features.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@er0ck ah, good to know! Updating now.

@whopper whopper force-pushed the PUP-5122/acceptance/direct_puppet_cache branch 3 times, most recently from db33e18 to c5a2110 Compare February 12, 2016 23:36
@whopper
Copy link
Contributor Author

whopper commented Feb 12, 2016

@er0ck updated steps and test_name with blocks

file { '#{basedir}/code_id.sh':
ensure => file,
content => "#{code_id_command}",
mode => "0700",
Copy link
Contributor

Choose a reason for hiding this comment

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

This assumes the user that puppet is running as (via beaker) is the same as what puppetserver is running as. I'm not sure if that'll be an issue for PE and pe-puppet? May want to relax to 0755.

This commit adds the skeleton of an acceptance test for the scenario
where the server tells the agent to run from its cached catalog and
remediates local drift to file content.

Once further work has been done on actually retrieving file content
using content_uri (PUP-5114), this test will be expanded.
@whopper whopper force-pushed the PUP-5122/acceptance/direct_puppet_cache branch from c5a2110 to 4a2c30f Compare February 17, 2016 19:38
@whopper
Copy link
Contributor Author

whopper commented Feb 17, 2016

@joshcooper ah, makes sense. Updated with relaxes perms.

@joshcooper
Copy link
Contributor

👍

joshcooper added a commit that referenced this pull request Feb 17, 2016
…et_cache

(PUP-5122) Add acceptance test for direct puppet running from cache
@joshcooper joshcooper merged commit 7463c7e into puppetlabs:master Feb 17, 2016
@joshcooper
Copy link
Contributor

I made a note in https://tickets.puppetlabs.com/browse/PUP-5114 that we'll want to update this test once the agent is using content_uri to retrieve versioned file content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants