Navigation Menu

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 3997 clean logdir #3692

Closed

Conversation

johnduarte
Copy link
Contributor

No description provided.

John Duarte added 2 commits March 7, 2015 21:06
This commit alters the default user and group parameter settings
in the create_test_file method of the Puppet::Acceptance::TempFileUtils
module.

If the host is a master, the value of `puppet config print {user,group}`
are used. Otherwise, the appropriate root user and group for the host's
platform are used.
This commit adds a get_file_manifest helper to the
Puppet::Acceptance::TempFileUtils module. It also modifies
acceptance tests that were impacting the state of the `logdir` on
SUTs to use this helper to return the state of this file resource
to its original state.
@puppetcla
Copy link

CLA signed by all contributors.

teardown do
on(agent, puppet('config', 'set', 'logdir', "'#{logdir} { owner = root, group = root, mode = 0700 }'", '--confdir', get_test_file_path(agent, '')))
on(agent, puppet("apply -e \"#{logdir_orig}\""))
end
Copy link
Contributor

Choose a reason for hiding this comment

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

@johnduarte I'm not following why these changes are necessary. Previously, the test created a temp confdir, and pointed logdir to another tempdir:

logdir = get_test_file_path(agent, 'log')
...
on(agent, puppet('config', 'set', 'logdir', "'#{logdir} { owner = root, group = root, mode = 0700 }'", '--confdir', get_test_file_path(agent, '')))

Then it executed puppet apply with the temp confdir:

on(agent, puppet('apply', get_test_file_path(agent, 'site.pp'), '--confdir', get_test_file_path(agent, '')))

So I would expect puppet to use the temp logdir specified in the temp confdir

@joshcooper
Copy link
Contributor

So I don't think this PR addressed the order dependent failures that caused us to revert.

I reverted the revert (git revert -m1 74c3f9367), and ran beaker twice, each time running one of the above tests followed by check_woy_cache_works and the tests passed. So there is some other test that causes check_woy_cache_works to fail.

$ be rake ci:test:aio SHA=56ed7667f9fdc867fd339ec26ee122b54c02ebf5 CONFIG=config/nodes/rhel7.yaml TESTS=tests/ticket_9862_puppet_runs_without_service_user_or_group_present.rb,tests/node/check_woy_cache_works.rb
...
tests/ticket_9862_puppet_runs_without_service_user_or_group_present.rb passed in 18.51 seconds
...
tests/node/check_woy_cache_works.rb passed in 72.39 seconds
...

              - Test Case Summary for suite 'tests' -
       Total Suite Time: 90.89 seconds
      Average Test Time: 45.45 seconds
              Attempted: 2
                 Passed: 2
                 Failed: 0
                Errored: 0
                Skipped: 0
                Pending: 0
                  Total: 2
$ be rake ci:test:aio SHA=56ed7667f9fdc867fd339ec26ee122b54c02ebf5 CONFIG=config/nodes/rhel7.yaml TESTS=tests/config/apply_file_metadata_specified_in_config.rb,tests/node/check_woy_cache_works.rb
...
tests/config/apply_file_metadata_specified_in_config.rb passed in 5.27 seconds
...
tests/node/check_woy_cache_works.rb passed in 69.11 seconds
...
              - Test Case Summary for suite 'tests' -
       Total Suite Time: 74.38 seconds
      Average Test Time: 37.19 seconds
              Attempted: 2
                 Passed: 2
                 Failed: 0
                Errored: 0
                Skipped: 0
                Pending: 0
                  Total: 2

@melissa melissa added the PL label Mar 9, 2015
options[:owner] = 'root'
end
end
end
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 to this part, as it eliminates things like ed7e048

@joshcooper
Copy link
Contributor

@johnduarte I included commit 18954ba in PR #3698, and dropped the other one as it was unused.

@joshcooper joshcooper closed this Mar 10, 2015
@johnduarte johnduarte deleted the pup-3997-clean-logdir branch March 10, 2015 15:46
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.

None yet

4 participants