voxpupuli / onceover

Your gateway drug to automated infrastructure testing with Puppet
Apache License 2.0
142 stars 45 forks source link

Embedded ruby functions in erb files fail tests #251

Open witchbutter opened 4 years ago

witchbutter commented 4 years ago

For some reason an upcase function in an erb file causes a failure:

roles::zookeeper: failed
  errors:
    error during compilation: Evaluation Error: Error while evaluating a Function Call, Failed to parse template profiles/motd/motd.erb:
  Filepath: /Users/witchbutter/onceover/control-repo/.onceover/etc/puppetlabs/code/environments/production/site/profiles/templates/motd/motd.erb
  Line: 13
  Detail: undefined method `upcase' for nil:NilClass
 (file: /Users/witchbutter/onceover/control-repo/.onceover/etc/puppetlabs/code/environments/production/site/profiles/manifests/motd/setmotd.pp, line: 5, column: 16) on node mymac.local
      factsets: CentOS-7.0-64, Ubuntu-14.04-64
dylanratcliffe commented 4 years ago

@witchbutter This is probably a failed hiera lookup, lack of global variable, or something else causing whatever the upcase method is being run on to be nil. Can you also post the template or give some more context?