Jira (PUP-11582) Resolve acceptance test failures on Windows 11

13 views
Skip to first unread message

Josh Cooper (Jira)

unread,
Jun 27, 2022, 3:05:02 PM6/27/22
to puppe...@googlegroups.com
Josh Cooper created an issue
 
Puppet / Task PUP-11582
Resolve acceptance test failures on Windows 11
Issue Type: Task Task
Assignee: Unassigned
Created: 2022/06/27 12:04 PM
Priority: Normal Normal
Reporter: Josh Cooper

Several puppet acceptance tests fail on Windows 11, so they have been marked as pending in 6.x and main. This ticket is to research why the tests are failing and file tickets if more work is required, such as to the VM template or code:

See https://github.com/puppetlabs/puppet/pull/8920

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)
Atlassian logo

Nirupama Mantha (Jira)

unread,
Jun 28, 2022, 4:11:03 PM6/28/22
to puppe...@googlegroups.com
Nirupama Mantha updated an issue
Change By: Nirupama Mantha
Sprint: Phoenix 2022-07-20

Nirupama Mantha (Jira)

unread,
Jun 28, 2022, 4:12:01 PM6/28/22
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Jun 28, 2022, 5:27:02 PM6/28/22
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Several puppet acceptance tests fail on Windows 11, so they have been marked as pending in 6.x and main. This ticket is to research why the tests are failing and file tickets if more work is required, such as to the VM template or code:

See [ https://github.com/puppetlabs/puppet/pull/8920 ]

To run tests execute the following steps:
{noformat}$ cd ~/work/puppet/acceptance
$ git checkout 6.x
$ git pull
$ rm Gemfile.lock
$ bundle update
{noformat}
Make sure you have recent beaker, etc gems that support Windows 11:
{noformat}$ bundle exec gem list | grep beaker | sort
beaker (4.37.0)
beaker-abs (0.10.1)
beaker-docker (0.8.4)
beaker-gke (0.0.3)
beaker-hostgenerator (1.16.0)
beaker-puppet (1.26.2)
beaker-vagrant (0.7.1)
beaker-vcloud (1.1.0)
beaker-vmpooler (1.4.0)
beaker-vmware (1.0.0)
{noformat}
Get the last passing *puppet-agent* SHA for the *6.x* branch, for example d3a3c70edc4316d30c1ddebde37359baa95e2bfc. You must specify the full SHA since it needs to match the the URL path on [https://builds.delivery.puppetlabs.net/puppet-agent/]<SHA>/. It is important to install a version of puppet-agent and puppetserver that are consistent with the tests you've checked out locally. For example, we don't want to run the tests from puppet#main against a host that has puppet-agent#6.x installed.

Then clone the nw-castle-black repo if needed:
{noformat}$ pushd ~/work
$ git clone https://github.com/puppetlabs/nw-castle-black
$ popd
{noformat}
And run beaker via its *{{setup.sh}}* script. See its [README|https://github.com/puppetlabs/nw-castle-black/tree/main/beaker] for details. Note the current working directory must be within the "acceptance/tests" subdirectory of the puppet repo:
{noformat}$ export SHA=d3a3c70edc4316d30c1ddebde37359baa95e2bfc
$ export SERVER_VERSION=6.19.0
$ ~/work/nw-castle-black/beaker/setup.sh redhat7-64ma-windows11ent-64a
...
{noformat}
Assuming that completes, you'll have a puppetserver (RedHat 7) and agent (Windows 11) on two different hosts, and the agent will be "registered" with the server (it'll have a client cert and be configured to talk to the server). Then you'll want to run each test that was marked pending in the pull request above, for example:
{noformat}$ bundle exec beaker exec tests/agent/agent_fails_with_unknown_resource.rb
{noformat}
Then comment out the "pending_test" line in the test and rerun the same command. It should fail. Try to figure out if there's something wrong with the test or if there is an issue with the code when running on Windows 11.

When you're done you'll have to run {{floaty delete <fqdn>}} for each host, since there's a bug in beaker-abs that prevents VMs from being deleted when running \{{bundle exec beaker destroy}}.

Next checkout {{{}puppet#main{}}}, get the last passing *puppet-agent#main SHA* and *SERVER_VERSION* and repeat.

Nirupama Mantha (Jira)

unread,
Jul 6, 2022, 12:33:01 PM7/6/22
to puppe...@googlegroups.com
Nirupama Mantha updated an issue
Change By: Nirupama Mantha
Sprint: Phoenix 2022-07-20
Reply all
Reply to author
Forward
0 new messages