Uploaded image for project: 'Puppet Development Kit'
  1. Puppet Development Kit
  2. PDK-374

`pdk test unit --list` output should be more useful

    Details

    • Type: Improvement
    • Status: Accepted
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Environment:

      PDK 0.5.0pre

    • Template:
    • Team:
      Puppet Developer Experience
    • Release Notes:
      Known Issue
    • Release Notes Summary:
      Hide
      The output of 'pdk test unit --list' is lacking detailed information, so tests appear duplicated and are presented with poor descriptions. To get the full text descriptions, the tests must actually be executed. And to surface the text to the user the tests must output junit format. So the command they should run to get full textual descriptions of their tests is 'pdk test unit --format=junit'.
      Show
      The output of 'pdk test unit --list' is lacking detailed information, so tests appear duplicated and are presented with poor descriptions. To get the full text descriptions, the tests must actually be executed. And to surface the text to the user the tests must output junit format. So the command they should run to get full textual descriptions of their tests is 'pdk test unit --format=junit'.
    • QA Risk Assessment:
      Needs Assessment

      Description

      Comparing the --list option with rspec --documentation, the information we give is unhelpful:

      pdk test unit --list
      [✔] Checking for missing Gemfile dependencies
      Examples:
      ./spec/classes/init_spec.rb[1:1:1]	foobar with default params 
      ./spec/classes/init_spec.rb[1:1:2]	foobar with default params 
      ./spec/classes/init_spec.rb[1:1:3]	foobar with default params 
      ./spec/classes/init_spec.rb[1:1:4]	foobar with default params 
      ./spec/classes/init_spec.rb[1:1:5]	foobar with default params 
      ./spec/classes/init_spec.rb[1:1:6]	foobar with default params 
      ./spec/classes/init_spec.rb[1:1:7]	foobar with default params 
      ./spec/classes/init_spec.rb[1:1:8]	foobar with default params 
      ./spec/classes/init_spec.rb[1:1:9]	foobar with default params 
      ./spec/classes/init_spec.rb[1:1:10]	foobar with default params 
      ./spec/classes/init_spec.rb[1:1:11]	foobar with default params 
      ./spec/classes/init_spec.rb[1:1:12]	foobar with default params 
      ./spec/classes/init_spec.rb[1:2:1]	foobar with nginx module 
      ./spec/classes/init_spec.rb[1:2:2]	foobar with nginx module 
      ./spec/classes/init_spec.rb[1:2:3]	foobar with nginx module

      rspec --documentation
      foobar
        with default params
          should compile into a catalogue without dependency cycles
          should contain Class[foobar::linux_agent]
          should not contain Class[foobar::nginx]
          should contain Yumrepo[foobar] with descr => "Foo Bar", baseurl => "http://yum.puppet.net/foobar/$releasever/$basearch", enabled => "1" and gpgcheck => "0"
          should contain Yumrepo[foobar-noarch] with descr => "Foo Bar", baseurl => "http://yum.puppet.net/foobar/$releasever/noarch", enabled => "1" and gpgcheck => "0"
          should contain Package[foobar-agent] with ensure => "1.18.1-1.el6" and require => "Yumrepo[foobar]"
          should contain File[/etc/init/foobar-agent.conf] with ensure => "absent" and require => "Package[foobar-agent]"
          should contain File[/etc/init.d/foobar-agent] with mode => "0755", source => "puppet:///modules/foobar/foobar.init" and require => "Package[foobar-agent]"
          should contain File[/etc/foobar/] with ensure => "directory" and mode => "0755"
          should contain File[/etc/foobar/agent.conf] with content =~ /accesskeyid = secret/, require => ["Package[foobar-agent]", "File[/etc/foobar/]"] and notify => "Service[foobar-agent]"
          should contain File[/etc/foobar/agent.conf] with content =~ /secretaccesskey = secret/
          should contain Service[foobar-agent] with ensure => "running", enable => true and require => "File[/etc/init.d/foobar-agent]"
        with nginx module
          should contain Class[foobar::nginx]
          should contain Package[foobar-module-nginx] with ensure => "1.1.7.el6-1" and require => "Package[foobar-agent]"
          should contain File[/etc/nginx/conf.d/a_foobar.conf] with content =~ /include       "\/opt\/foobar\/nginx\/foobar.conf";/ and require => "Package[foobar-module-nginx]"

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                Unassigned
                Reporter:
                james.stocks James Stocks
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Zendesk Support