puppetlabs-toy-chest / puppet-quest-guide

Quest Guide for the Puppet Learning VM
Other
44 stars 75 forks source link

Quest "control_repository" task 3 test differs from the document steps #264

Closed rfreiberger closed 5 years ago

rfreiberger commented 5 years ago

Hello Puppet,

I'm going over the Puppet Learning VM version 6.5 and upon quest control_repository I found that the document and the test differ from each other. I wanted to confirm if this was intended or a mistake.

From the guide document.

Include the following line at the end of the file to ensure that both site and modules are included in the modulepath setting for this environment.

modulepath = site:modules:$basemodulepath

Code which has the testing. https://github.com/puppetlabs/puppet-quest-guide/blob/master/tests/control_repository_spec.rb#L60

describe _("Task 3:"), host: :localhost do
  it 'has a working solution', :solution do
    command("yes | cp -f #{SOLUTION_PATH}/control_repository/3/environment.conf /root/control-repo/environment.conf")
      .exit_status
      .should eq 0
  end
  it _('Copy and edit the environment.conf file'), :validation do
    file("/root/control-repo/environment.conf")
      .content
      .should match /\.\/site:\.\/modules:\$basemodulepath/
  end
end

The end result is that the line you are asked to enter in the environment.conf file is not going to pass the testing for task 3.

If you add this to the file it will pass the testing.

./site:./modules:$basemodulepath

I would have made a PR for this but I'm not sure what is correct as I'm a newbie to Puppet.

Thanks, Robert

greglarkin commented 5 years ago

Hi @rfreiberger, I am currently working on updating the LVM to the latest version of PE and Gitea, and I just ran across this as well. I have fixed the spec test to match the content already in the quest guide, i.e. omitting the ./ paths. The ./ does not need to be specified in the environment.conf since the paths listed there are already relative to the environment directory.

Thank you for the report, and look for an updated LVM to be released in the near future.