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:
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:
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.