Issue #12263 has been updated by Moses Mendoza.
Can this ticket be updated? ---------------------------------------- Feature #12263: puppet module face actions need acceptance testing https://projects.puppetlabs.com/issues/12263#change-68261 Author: Matt Robinson Status: Merged - Pending Release Priority: Normal Assignee: Category: Target version: 2.7.x Affected Puppet version: Keywords: geordi v1 Branch: At least the basic functionality should be tested at the acceptance level for the module tool commands (list, upgrade, install, etc). The UX wireframe docs have a workflow that could be turned into acceptance level tests that tell a good user story. The info is elsewhere, but I'll paste it in here for ease of reference. <pre> ## Style Conventions ## * Warning output should go to STDERR, all other output to STDOUT. * Colors should be supressed if the output stream is not a TTY. * If a operation is being performed against an unknown module version, use `???` as the version string. * Messages sent to STDERR should be bright red. * Upgrading modules should display the affected versions as `([oldVersion] -> [newVersion])` * `oldVersion` should be yellow, `newVersion` should be cyan. * Version ranges should be bright magenta. * The version string for modules that are not installed should be yellow. * The version string for installed modules should be cyan. * Nice to have: if the output stream is not a TTY, default to YAML or JSON output. ## Workflow Wireframes ## ### Get a module to manage Apache from the Forge. ### • List currently installed modules # puppet module list /etc/puppet/modules (no modules installed) /usr/share/puppet/modules (no modules installed) • Search for an Apache module # puppet module search apache NAME DESCRIPTION AUTHOR KEYWORDS apache Manage an Apache installation. @jimmy apache passenger Manage Passenger installs. @john passenger apache webapp rails Deploy Rails applications with Apache! @jones rails ruby webapp > Matches for the search term should be colored green • Install an appropriate looking module # puppet module install apache /etc/puppet/modules └── apache (v1.1.0) • List currently installed modules # puppet module list /etc/puppet/modules └── apache (v1.1.0) /usr/share/puppet/modules (no modules installed) ### Grab and apply the Homebrew bootstrapping module. ### • List currently installed modules # puppet module list /etc/puppet/modules (no modules installed) /usr/share/puppet/modules (no modules installed) • Try to install the Homebrew module into a non-existent directory # ls # puppet module install homebrew --dir nonexistent Could not install `homebrew` (v0.1.0): Directory `nonexistent` does not exist • Create a new directory # mkdir target-directory # ls target-directory • Install the Homebrew module into the created directory # puppet module install homebrew --dir target-directory ./target-directory └── homebrew (v0.1.0) • List currently installed modules # puppet module list /etc/puppet/modules (no modules installed) /usr/share/puppet/modules (no modules installed) • List currently installed modules in the specified directory # puppet module list --dir target-directory ./target-directory └── homebrew (v0.1.0) • Apply the module # puppet apply --modulepath target-directory -e 'class { "homebrew": }' notice: /Stage[main]/Homebrew/File[/usr/local]/ensure: created notice: /Stage[main]/Homebrew/Exec[Install Homebrew from Tarball]/returns: executed successfully notice: /Stage[main]/Homebrew/Package[git]/ensure: created notice: /Stage[main]/Homebrew/Exec[Update Homebrew via Git]/returns: executed successfully notice: Finished catalog run in 192.88 seconds • Uninstall the Homebrew module from the created directory # puppet module uninstall homebrew --dir target-directory Removed ./target-directory/homebrew (v0.1.0) • Delete the created directory # rmdir target-directory • List currently installed modules # puppet module list /etc/puppet/modules (no modules installed) /usr/share/puppet/modules (no modules installed) ### Try to force the system into an inconsistent state. ### • List currently installed modules # puppet module list /etc/puppet/modules (no modules installed) /usr/share/puppet/modules (no modules installed) • Install a module with dependencies # puppet module install mylvmbackup /etc/puppet/modules └─┬ mylvmbackup (v1.1.0) ├── backup (v1.2.0) └─┬ mysql (v1.0.2) └── puppet (v1.0.1) • List currently installed modules # puppet module list /etc/puppet/modules ├── backup (v1.2.0) ├── mylvmbackup (v1.1.0) ├── mysql (v1.0.2) └── puppet (v1.0.1) /usr/share/puppet/modules (no modules installed) • List the dependency tree for installed modules # puppet module list --tree /etc/puppet/modules └─┬ mylvmbackup (v1.1.0) ├── backup (v1.2.0) └─┬ mysql (v1.0.2) └── puppet (v1.0.1) /usr/share/puppet/modules (no modules installed) • Try to install the module again # puppet module install mylvmbackup Could not install `mylvmbackup` (v1.1.0): Module `mylvmbackup` is already installed (v1.1.0) • Try to uninstall an older version of the module # puppet module uninstall mylvmbackup --version 1.0.0 Could not uninstall `mylvmbackup` (v1.0.0): Installed version of `mylvmbackup` (v1.1.0) does not match version range • Try to uninstall the dependency # puppet module uninstall backup Could not uninstall module `backup` (v1.2.0): Depended upon by `mylvmbackup` (v1.1.0) • Try to update the dependency to an unsupported version # puppet module update backup --version 3.x Could not upgrade module `backup` (v1.2.0 -> v3.0.4): `backup` (v3.0.4) does not match (v1.x) `mylvmbackup` (v1.1.0) requires `backup` (v1.x) • Manually remove the dependency # puppet module list /etc/puppet/modules ├── backup (v1.2.0) ├── mylvmbackup (v1.1.0) ├── mysql (v1.0.2) └── puppet (v1.0.1) /usr/share/puppet/modules (no modules installed) # rm -r /etc/puppet/modules/backup # puppet module list Missing dependency `backup` (v1.x): `mylvmbackup` (v1.1.0) requires `backup` (v1.x) /etc/puppet/modules ├── mylvmbackup (v1.1.0) ├── mysql (v1.0.2) └── puppet (v1.0.1) /usr/share/puppet/modules (no modules installed) # puppet module list --tree Missing dependency `backup` (v1.x): `mylvmbackup` (v1.1.0) requires `backup` (v1.x) /etc/puppet/modules └─┬ mylvmbackup (v1.1.0) ├── UNMET DEPENDENCY backup (v1.x) └─┬ mysql (v1.0.2) └── puppet (v1.0.1) /usr/share/puppet/modules (no modules installed) • Try to uninstall the dependency # puppet module uninstall backup Could not uninstall module `backup`: Module `backup` is not installed • Try to update the dependency # puppet module update backup Could not update module `backup` (??? -> v1.0.0): Module `backup` is not installed • Install an old version of the dependency # puppet module install backup --version 0.x Could not install module `backup` (v0.9.1): `backup` (v0.9.1) does not match (v1.x) `mylvmbackup` (v1.1.0) requires `backup` (v1.x) # puppet module install backup --version 0.x --force /etc/puppet/modules └── backup (v0.9.1) • List the dependency tree for installed modules # puppet module list --tree Module `mylvmbackup` (v1.1.0) requires `backup` (v1.x); `backup` (v0.9.1) is installed /etc/puppet/modules └─┬ mylvmbackup (v1.1.0) ├── backup (v0.9.1) invalid └─┬ mysql (v1.0.2) └── puppet (v1.0.1) /usr/share/puppet/modules (no modules installed) • Try to install the module again # puppet module install backup Could not install module `backup` (v1.0.0): Module `backup` is already installed (v0.9.1) • Try to install a module that has a disjoint dependency # puppet module install something Could not install module `something` (v1.3.2): No version of `backup` will satisfy dependencies: `mylvmbackup` (v1.1.0) requires `backup` (v1.x) `something` (v1.3.2) requires `backup` (v2.x) • Install the module without installing its dependencies # puppet module install something --no-dependencies Module `mylvmbackup` (v1.1.0) requires `backup` (v1.x); `backup` (v0.9.1) is installed Module `something` (v1.3.2) requires `backup` (v2.x); `backup` (v0.9.1) is installed /etc/puppet/modules └── something (v1.3.2) • Uninstall the module # puppet module uninstall something Module `mylvmbackup` (v1.1.0) requires `backup` (v1.x); `backup` (v0.9.1) is installed Removed /etc/puppet/modules/something (v1.3.2) • Install a module with overlapping dependencies # puppet module install someother /etc/puppet/modules └─┬ someother (v1.1.0) └── backup (v0.9.1 -> v1.1.2) • Try to update the dependency # puppet module update backup Could not update module `backup` (v1.1.2 -> v1.1.2): Latest version is already installed Version restricted by: `mylvmbackup` (v1.1.0) requires `backup` (v1.x) `someother` (v1.3.2) requires `backup` (v1.1.x) • Try to update the original module # puppet module update mylvmbackup Could not update module `mylvmbackup` (v1.1.0 -> v1.1.0): Latest version is already installed • Uninstall the module with the overlapping dependencies # puppet module uninstall someother Removed /etc/puppet/modules/someother (v1.1.0) • Update the original module # puppet module update mylvmbackup Could not update module `mylvmbackup` (v1.1.0 -> v1.1.0): Latest version is already installed • Manually remove the dependency # puppet module list /etc/puppet/modules ├── backup (v1.1.2) ├── mylvmbackup (v1.1.0) ├── mysql (v1.0.2) └── puppet (v1.0.1) /usr/share/puppet/modules (no modules installed) # rm -r /etc/puppet/modules/backup # puppet module list Missing dependency `backup` (v1.x): `mylvmbackup` (v1.1.0) requires `backup` (v1.x) /etc/puppet/modules ├── mylvmbackup (v1.1.0) ├── mysql (v1.0.2) └── puppet (v1.0.1) /usr/share/puppet/modules (no modules installed) # puppet module list --tree Missing dependency `backup` (v1.x): `mylvmbackup` (v1.1.0) requires `backup` (v1.x) /etc/puppet/modules └─┬ mylvmbackup (v1.1.0) ├── UNMET DEPENDENCY backup (v1.x) └─┬ mysql (v1.0.2) └── puppet (v1.0.1) /usr/share/puppet/modules (no modules installed) • Update the original module # puppet module update mylvmbackup Missing dependency `backup` (v1.x): `mylvmbackup` (v1.1.0) requires `backup` (v1.x) /etc/puppet/modules └─┬ UNCHANGED mylvmbackup (v1.1.0) └── backup (??? -> v1.2.0) ### Test out a module update in an appropriate environment. ### • List currently installed modules # puppet module list /etc/puppet/modules (no modules installed) /usr/share/puppet/modules (no modules installed) • List currently installed modules in the test environment # puppet module list --env test /etc/puppet/environments/test/modules ├── apache (v1.0.0) └── homebrew (v0.1.0) /usr/share/puppet/environments/test/modules └── mysql (v1.0.0) • Try to update a module in the test environment that has no newer version # puppet module update homebrew --env test Could not update module `homebrew` (v0.1.0 -> v0.1.0): Latest version is already installed • Update a module in the test environment # puppet module update mysql --env test /usr/share/puppet/environments/test/modules └── mysql (v1.0.0 -> v1.1.0) • List currently installed modules in the test environment # puppet module list --env test /etc/puppet/environments/test/modules ├── apache (v1.0.0) └── homebrew (v0.1.0) /usr/share/puppet/environments/test/modules └── mysql (v1.1.0) • List currently installed modules # puppet module list /etc/puppet/modules (no modules installed) /usr/share/puppet/modules (no modules installed) • Uninstall the module from the test environment # puppet module uninstall homebrew --env test Removed /etc/puppet/environments/test/modules/homebrew (v0.1.0) • List currently installed modules in the test environment # puppet module list --env test /etc/puppet/environments/test/modules └── apache (v1.0.0) /usr/share/puppet/environments/test/modules └── mysql (v1.1.0) ### Uninstall modules that are no longer being used. ### • List currently installed modules # puppet module list /etc/puppet/modules ├── apache (v1.0.0) ├── homebrew (v0.1.0) └── rbenv (v0.2.0) /usr/share/puppet/modules ├── backup (v1.0.0) ├── mylvmbackup (v1.1.0) ├── mysql (v1.0.2) ├── mysql2 (v1.0.0) └── puppet (v1.0.1) • Try to uninstall a module which is depended upon # puppet module uninstall homebrew Could not uninstall module `homebrew` (v0.1.0): Depended upon by `rbenv` (v0.2.0) • List the dependency tree for installed modules # puppet module list --dependencies /etc/puppet/modules ├── apache (v1.0.0) └─┬ rbenv (v0.2.0) └── homebrew (v0.1.0) /usr/share/puppet/modules ├─┬ mylvmbackup (v1.1.0) | ├── backup (v1.0.0) | └─┬ mysql (v1.0.2) | └── puppet (v1.0.1) └── mysql2 (v1.0.0) • Uninstall a module which is not depended upon # puppet module uninstall apache Removed /etc/puppet/modules/apache (v1.0.0) • List currently installed modules # puppet module list /etc/puppet/modules ├── homebrew (v0.1.0) └── rbenv (v0.2.0) /usr/share/puppet/modules ├── backup (v1.0.0) ├── mylvmbackup (v1.1.0) ├── mysql (v1.0.2) ├── mysql2 (v1.0.0) └── puppet (v1.0.1) </pre> -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
