Closed PaulWalkerUK closed 4 years ago
@PaulWalkerUK are you using a custom template to generate your module? Would you mind zipping up your pwtest module and attacting it to the issue?
I think we may have found my issue...! When I tried zipping it up (just through the standard Windows GUI "Send to compressed folder"), I got a message saying The compression cannot be poerformed because the path to the file or directory 'pwtest' is too long
. I copied this folder to C:\git
and pdk validate
and pdk test unit
work as expected (the original path was C:\Users\Paul\Git\pwtest
. Guess there must be some quite long path names!
I think we may have found my issue...! When I tried zipping it up (just through the standard Windows GUI "Send to compressed folder"), I got a message saying The compression cannot be performed because the path to the file or directory 'pwtest' is too long
. 7-Zip also failed with Incorrect function
. I copied the folder to C:\git
and now both pdk validate
and pdk test unit
work as expected (the original path was C:\Users\Paul\Git\pwtest
). Guess there must be some quite long path names!
No, I'm not using a custom template. I've zipped and attached the module, after moving it to C:\git
(Windows standard functionality still struggled to zip it - I think maybe because of the recursion in spec\fixtures\modules
(?) but 7-zip was able to deal with it).
So it looks like everything's OK when the base folder is c:\git
instead of C:\Users\Paul\Git
Just in case anyone else stumbles across this in the future...
Even after moving the module to C:\git\
, I was still having an issue with pdk test unit
not executing any tests and comng back with Cannot create a file when that file already exists
. I fixed it by deleting C:\git\puppet-xorg\spec\fixtures\modules
. Next time I ran pdk test unit
it was successful, an recreated that modules
directory.
Describe the bug Using PDK 1.14.1 on Windows (installed via Chocolatey), I get a lot of validation errors on the files that are created by
new module
. Also after creating a new class,test unit
doesn't execute the default tests, buttest unit --list --verbose
does see them.To Reproduce
Create a new module with
pdk new module pwtest
and just accept the default at all promptsGo into the new directory
Run
pdk validate
. It gives messages such as:Create a new class with
pdk new class pwclass
Running
pdk test unit
doesn't execute any tests:pdk test unit --list --verbose
does show them:Expected behavior After creating a new module and a new class,
pdk validate
should return no issues andpdk test unit
should execute (and pass) the default tests.Additional context
pdk --version
): 1.14.1At first, this seemed intermittent, but now it seems to happen all the time. I'm fairly new to Puppet etc, but I'm not aware of having done anything to contribute to this! 😄