Skip to content

MODULES-3699 Deprecation spec fix 2#646

Merged
bmjen merged 1 commit intopuppetlabs:masterfrom
eputnam:deprecation_spec_fix_2
Sep 1, 2016
Merged

MODULES-3699 Deprecation spec fix 2#646
bmjen merged 1 commit intopuppetlabs:masterfrom
eputnam:deprecation_spec_fix_2

Conversation

@eputnam
Copy link
Copy Markdown
Contributor

@eputnam eputnam commented Sep 1, 2016

  1. The manifest containing the deprecation function needed to be modified (surrounded in double quotes) to work as a puppet apply command on windows.
  2. "exist" was not working on Solaris 10 because the underlying command doesn't actually exist on Solaris 10, so I changed it to "be_file" which works just fine for this.
  3. Added conditional logic to accommodate Windows paths.

@eputnam eputnam force-pushed the deprecation_spec_fix_2 branch from fee6697 to 9b2a65f Compare September 1, 2016 18:34
test_file = "/tmp/deprecation"
end

add_file_manifest = "\"deprecation('key', 'message') file { '#{test_file}': ensure => present, content => 'test', }\""
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you make this look like this instead:

add_file_manifest = <<-EOS
  deprecation('key', 'message')
  file { '#{test_file}': 
    ensure => present,
    content => 'test', 
  }
EOS

It's just easier to read and maintain.

Same with remove_file_manifest.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be totally easier to read and maintain that way, but since it's run on the command line (puppet apply -e style) instead of with apply_manifest, Windows seems to need it formatted this way.

@eputnam eputnam force-pushed the deprecation_spec_fix_2 branch 2 times, most recently from 3875b7f to d2296c9 Compare September 1, 2016 23:06
@bmjen bmjen merged commit 5de6783 into puppetlabs:master Sep 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants