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

(MODULES-6744) Add testmode switcher #158

Merged
merged 2 commits into from
Mar 15, 2018
Merged

(MODULES-6744) Add testmode switcher #158

merged 2 commits into from
Mar 15, 2018

Conversation

jpogran
Copy link
Contributor

@jpogran jpogran commented Mar 6, 2018

No description provided.

@jpogran
Copy link
Contributor Author

jpogran commented Mar 8, 2018

This has passed adhoc

@jpogran jpogran changed the title (WIP)(MODULES-6744) Add testmode switcher (MODULES-6744) Add testmode switcher Mar 8, 2018
windows_agents.each do |agent|
agent_is_x64 = is_x64(agent)
Copy link
Contributor

Choose a reason for hiding this comment

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

If the nodeset includes both 32-bit and 64-bit agents, this doesn't seem right... I think you'd want to filter the nodes for x64, then change the execute_manifest below to execute_manifest_on and only use 64-bit agents.

windows_agents.each do |agent|
agent_is_x64 = is_x64(agent)
Copy link
Contributor

Choose a reason for hiding this comment

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

With multiple nodes in the nodeset, last one wins, which doesn't seem accurate if there are both 64-bit and 32-bit nodes...

Copy link
Contributor

@Iristyle Iristyle left a comment

Choose a reason for hiding this comment

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

A handful of changes for nodeset iterations can now be done with beaker-testmode_switcher 0.4.0 shipping and adding execute_manifest_on.

end
assert_no_match(/err:/, @result.stdout, 'Expected no error messages.')
agent_is_x64 = is_x64(agent)
end
Copy link
Contributor

Choose a reason for hiding this comment

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

Think this end can be removed, and the tests can iterate over each node in the nodeset as was done previously... now that execute_manifest_on(agent, can be used.

@jpogran
Copy link
Contributor Author

jpogran commented Mar 8, 2018

Replaced previous attempt with the new execute_manfiest_on methods

.sync.yml Outdated
optional:
':system_tests':
- gem: beaker-testmode_switcher
version: '<= 0.2.0'
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks like an accident - I think we need the 0.4.0 release for execute_manifest_on here and in Gemfile

ThoughtCrhyme
ThoughtCrhyme approved these changes Mar 8, 2018
Copy link
Contributor

@ThoughtCrhyme ThoughtCrhyme left a comment

Choose a reason for hiding this comment

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

Looks good to me, though there should be a smoke test for the module installing on the master without issue. But that's outside the scope of this ticket. edit: pending the gem version update

@glennsarti
Copy link
Contributor

@ThoughtCrhyme RE "smoke test for the module installing" I thought we'd get that implicitly by testing on with master?

@ThoughtCrhyme
Copy link
Contributor

@glennsarti I don't think we will if we continue to guard on windows_agents like we do here: https://github.com/puppetlabs/puppetlabs-registry/pull/158/files#diff-5e01029f711c726dc52525d83b377506R104

@glennsarti
Copy link
Contributor

glennsarti commented Mar 9, 2018

But if it's doing a puppet agent -t then the master has to have the module installed in order to compile a catalog. Doesn't matter which client (the master or windows box) actually initiates the agent run.

@jpogran
Copy link
Contributor Author

jpogran commented Mar 9, 2018

Updated both gemfile and sync.yml with correct (newest) versions

.sync.yml Outdated
optional:
':system_tests':
- gem: beaker-testmode_switcher
version: '<= 0.4.0'
Copy link
Contributor

Choose a reason for hiding this comment

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

This sets a maximum version of 0.4.0... but we want a minimum of 0.4.0. Any of these would work:

  • ~> 0.4 - pessimistically versioned to < 1.0
  • = 0.4.0 - pin
  • >= 0.4.0 - anything going forward

First option is probably the safe bet for now...

jpogran added 2 commits March 15, 2018 10:17
This commit updates all the supporting files to add
beaker-testmode-switcher to this module
This commit converts the tests to use beaker-testmode-switcher.
@jpogran
Copy link
Contributor Author

jpogran commented Mar 15, 2018

Updated with new version constraint

@Iristyle Iristyle merged commit ef2f83e into puppetlabs:master Mar 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants