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

PDK test unit on windows tries to create c:\dev

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PDK 1.6.0
    • Component/s: None
    • Template:
    • Team:
      Puppet Developer Experience
    • Method Found:
      Needs Assessment
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      There is a bug in Puppet that attempts to initialize a test environment in `/dev/null`, which causes an error on Windows, since `/dev/null` is a *nix convention. This fix will be made to rspec-puppet to override the `/dev/null` values when running on Windows and change the values to `NUL`.
      Show
      There is a bug in Puppet that attempts to initialize a test environment in `/dev/null`, which causes an error on Windows, since `/dev/null` is a *nix convention. This fix will be made to rspec-puppet to override the `/dev/null` values when running on Windows and change the values to `NUL`.
    • QA Risk Assessment:
      Needs Assessment

      Description

      On a VMPooler win2012 machine:

      • create a test user that is not a administrator
      • add the test user to the "Remote Desktop Users" group
      • Set the permissions on C:\ to "Subfolders only" for "create directories/append content" for the Users group
      • in a powershell:
        • pdk new module some_name
        • cd some_name
        • pdk new class some_name
        • pdk test unit

       

      Executing 'ruby C:/Users/jbird12/Desktop/modulename/bin/rake spec[]'
      ...
      failed: rspec: ./spec/classes/modulename_spec.rb:23: Permission denied @ dir_s_mkdir - C:/dev
      undefined method `clear' for nil:NilClass
       
      
      

      If you are not an administrator user, you won't be able to create folders on the C:\ drive.  I think this is within rspec that is causing it, but not sure who should fix it.

      After much struggle, I could get a proper stacktrace out of ruby:

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                tim.sharpe Tim Sharpe
                Reporter:
                jessykah Jessykah Bird
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: