### Set Up and Run Puppet Agent Acceptance Tests Source: https://github.com/openvoxproject/openvox-agent/blob/main/acceptance/README.md This snippet provides the initial setup steps required to run acceptance tests for Puppet Agent, including navigating to the acceptance directory and installing bundle dependencies before executing rake commands. ```Shell cd acceptance bundle install --path .bundle bundle exec rake ENVIRONMENT_VARIABLE=value ``` -------------------------------- ### Run Smoke Test for Package-Installed Components Source: https://github.com/openvoxproject/openvox-agent/blob/main/ext/smoke/README.md This script manually smoke tests platform components installed from packages. It requires two Red Hat 7 x86_64 VMs and takes VM hostnames, agent, server, and PuppetDB versions as arguments. ```bash ./packages/run-smoke-test.sh ``` -------------------------------- ### Run Smoke Test for Repository-Installed Components Source: https://github.com/openvoxproject/openvox-agent/blob/main/ext/smoke/README.md This script manually smoke tests platform components installed from a shared repository, ensuring released packages can run. It covers scenarios where PuppetDB is installed via packages or modules. It requires four Red Hat 7 x86_64 VMs and takes VM hostnames, agent, server, and PuppetDB versions as arguments. ```bash ./repos/run-smoke-test.sh ``` -------------------------------- ### Checkout Pull Request Branch with Hub Gem Source: https://github.com/openvoxproject/openvox-agent/blob/main/COMMITTERS.md This command uses the `hub` gem to automate checking out a pull request by adding the remote repository and creating a local tracking branch. It simplifies the process of getting a contributor's branch locally for review or further work. ```Shell $ hub checkout https://github.com/puppetlabs/puppet-agent/pull/1234 Branch jeffmccune-fix_foo_error set up to track remote branch fix_foo_error from jeffmccune. Switched to a new branch 'jeffmccune-fix_foo_error' ``` -------------------------------- ### VANAGON_LOCATION Environment Variable Configuration Source: https://github.com/openvoxproject/openvox-agent/blob/main/README.md Describes how to override the Vanagon location using the `VANAGON_LOCATION` environment variable. This variable can be set before `bundle install` or updated with `bundle update`, accepting specific tags, remote Git locations, or file paths. ```APIDOC VANAGON_LOCATION: string Description: Overrides the location of Vanagon in the Gemfile. Accepted Formats: - "0.3.14": Specific tag from the Vanagon git repository. - "https://github.com/OpenVoxProject/vanagon#version": Remote git location and version (can be a ref, branch, or tag). - "file:///workspace/vanagon": Absolute file path. - "file://../vanagon": File path relative to the project directory. ``` -------------------------------- ### Display Rake Help and Available Tasks Source: https://github.com/openvoxproject/openvox-agent/blob/main/acceptance/README.md These commands provide information about the `rake` acceptance test suite, allowing users to view useful environment variables and a comprehensive list of all available `rake` tasks for test execution. ```Shell bundle exec rake help ``` ```Shell bundle exec rake -T ``` -------------------------------- ### Build Puppet Agent with Vanagon Source: https://github.com/openvoxproject/openvox-agent/blob/main/README.md Instructions on how to build the puppet-agent package using vanagon. This command requires specifying the project name, target platform, and the hostname of a VM where the build will occur. Ensure puppet-runtime and pxp-agent components are correctly configured with local paths if building custom versions. ```sh bundle exec vanagon build ``` -------------------------------- ### Puppet Agent Acceptance Test Caveats Source: https://github.com/openvoxproject/openvox-agent/blob/main/acceptance/README.md This section highlights important prerequisites and limitations for running Puppet Agent acceptance tests, specifically noting the requirement for pre-built packages on a download server. It also mentions future development plans to support local package building. ```APIDOC Running acceptance tests requires packages of the test target SHA have already been built and exist on a download server that beaker can install from. The two most commonly used download urls are: - http://nightlies.delivery.puppet.net (public) - http://builds.delivery.puppetlabs.net (internal) Future Development: - A future version of acceptance tests will support building packages of a given SHA locally and then running acceptance tests against those packages. ``` -------------------------------- ### Run Acceptance Tests for Specific Puppet Agent Versions and Platforms Source: https://github.com/openvoxproject/openvox-agent/blob/main/acceptance/README.md This command executes acceptance tests against a specified Puppet Agent version and platform, downloading packages from an internal build server. It demonstrates targeting a specific version and operating system, such as Windows 2016. ```Shell bundle exec rake acceptance:development SHA='1.7.0' TEST_TARGET=windows2016-64a ``` -------------------------------- ### Rebase Bug Fix onto Stable Branch Source: https://github.com/openvoxproject/openvox-agent/blob/main/COMMITTERS.md This sequence of commands first creates a new local branch for the bug fix, then rebases the changes from the original `master` base onto the `stable` branch. This ensures the bug fix is correctly applied to the appropriate base for patch releases. ```Shell $ git branch bug/stable/fix_foo_error $ git rebase --onto stable master bug/stable/fix_foo_error First, rewinding head to replay your work on top of it... Applying: (#23456) Fix FooError that always bites users in 1.6.2 ``` -------------------------------- ### Run Acceptance Tests Against Released Puppet Agent Packages Source: https://github.com/openvoxproject/openvox-agent/blob/main/acceptance/README.md This command executes acceptance tests against released Puppet Agent packages from production repositories on a specified platform. It ensures testing against stable, publicly available versions, such as Puppet Agent 1.8.0 on Ubuntu 16.04. ```Shell bundle exec rake acceptance:released SHA='1.8.0' TEST_TARGET=ubuntu1604-64a ``` -------------------------------- ### Run Acceptance Tests Against Latest Nightly Build Source: https://github.com/openvoxproject/openvox-agent/blob/main/acceptance/README.md This command runs acceptance tests using the latest nightly build of Puppet Agent from the public nightlies server. It utilizes default agent and server platforms, making it suitable for continuous integration with the newest builds. ```Shell bundle exec rake acceptance:development SHA='latest' AGENT_DOWNLOAD_URL='http://nightlies.puppet.com' ``` -------------------------------- ### Merge Stable Branch into Master Source: https://github.com/openvoxproject/openvox-agent/blob/main/COMMITTERS.md Following the merge into `stable`, this command checks out the `master` branch and merges `stable` into it, again using `--no-ff --log`. This propagates the bug fix up to the `master` branch while maintaining commit identifiers and a clear merge history. ```Shell $ git checkout master Switched to branch 'master' $ git merge --no-ff --log stable Merge made by the 'recursive' strategy. foo | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 foo ``` -------------------------------- ### Git Merge for Stable to Main Branch Source: https://github.com/openvoxproject/openvox-agent/blob/main/README.md A sample Git command sequence used to merge changes from the 'stable' branch into 'main'. This specific sequence ensures that component references promoted by CI pipelines (SHAs) are restored to their 'main' branch versions after the merge, while other changes from 'stable' are integrated. ```sh git merge --no-commit --no-ff stable for i in {hiera,facter,puppet,pxp-agent,cpp-pcp-client}; do git checkout main -- configs/components/$i.json;done git commit -m "(maint) Restore promoted components refs after merge from stable" ``` -------------------------------- ### Pushing Merged Changes to Remote Stable and Master Branches Source: https://github.com/openvoxproject/openvox-agent/blob/main/COMMITTERS.md This command demonstrates how to push local `master` and `stable` branches to their respective remote counterparts on the `puppetlabs` remote simultaneously. This ensures both branches are up-to-date after a merge operation. ```Shell $ git push puppetlabs master:master stable:stable ``` -------------------------------- ### Rake Acceptance Test Environment Variables Reference Source: https://github.com/openvoxproject/openvox-agent/blob/main/acceptance/README.md This section documents the environment variables used to configure Puppet Agent acceptance tests, detailing their purpose, valid values, and default behaviors. These variables control aspects like package versions, test targets, download URLs, and specific tests to run. ```APIDOC SHA: type: string (required) description: Git reference (SHA or tag) of packages of this repository to be put under test. Also supports the literal string 'latest' which references the latest build on http://nightlies.puppet.com. notes: If setting SHA to 'latest', you must also set ENV['AGENT_DOWNLOAD_URL'] to http://nightlies.puppet.com. BEAKER_HOSTS: type: string description: Supply the path to a yaml file in the format of a beaker hosts file containing the test targets, roles, etc., or specify it in a beaker options.rb file. example: config/nodes/foo.yaml TEST_TARGET: type: string description: Supply a test target in the form beaker-hostgenerator accepts. default: A constant defined in Rakefile. example: ubuntu1504-64a AGENT_DOWNLOAD_URL: type: string description: Supply the url of the host serving packages of puppet agent to test matching SHA. Ignored by 'rake acceptance:released' which always uses the production Puppet repository urls. valid_values: - http://builds.delivery.puppetlabs.net (Puppet internal builds) - http://nightlies.puppet.com (Puppet public nightly builds) default: http://builds.delivery.puppetlabs.net example: http://example.com TESTS: type: string description: Supply a comma-separated string (no spaces) of specific test(s) to run. All pre-suites will be run, unless a specific pre-suite file is supplied as the value to this option, in which case test exercise will terminate after the supplied pre-suite file. notes: Relative to 'acceptance' directory. example: tests/ensure_version_file.rb OPTIONS: type: string description: Supply additional options to pass to the beaker invocation. example: --preserve-hosts=never local_options.rb: description: If there is a Beaker options hash in a ./local_options.rb, it will be included. Commandline options set through the above environment variables will override settings in this file. ``` -------------------------------- ### Merge Bug Fix into Stable Branch Source: https://github.com/openvoxproject/openvox-agent/blob/main/COMMITTERS.md After rebasing the bug fix branch, this command checks out the `stable` branch and merges the bug fix using a `--no-ff --log` strategy. This approach preserves the commit history and ensures the merge is explicitly recorded, preventing fast-forward merges. ```Shell $ git checkout stable Switched to branch 'stable' $ git merge --no-ff --log bug/stable/fix_foo_error Merge made by the 'recursive' strategy. foo | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 foo ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.