Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-2867

RSpec tests for create_ini_settings function on Puppet 4.0 and 4.1

    Details

    • Type: Bug
    • Status: Accepted
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: inifile
    • Labels:
    • Environment:

      Ubuntu 14.04 with Ruby 2.1.7

    • Template:

      Description

      It seems there are some problems with the create_ini_settings function in conjunction with Puppet v4.0 and v4.1. The isssue seems to be already covered by the existing rspec tests, though:

      git clone https://github.com/puppetlabs/puppetlabs-inifile
      cd puppetlabs-inifile
      rvm use 2.1.7@puppetlabs-inifile --create
      PUPPET_GEM_VERSION=4.0 bundle install
      rake spec_prep
      rspec spec/classes/create_ini_settings_test_spec.rb
      

      The errors are of the following type:

      2) create_ini_settings_test should contain Ini_setting[/tmp/foo.ini [section1] setting1] with ensure => "present", section => "section1", setting => "setting1", value => "val1" and path => "/tmp/foo.ini"
           Failure/Error: it { should contain_ini_setting('/tmp/foo.ini [section1] setting1').with(
           Puppet::Error:
             Evaluation Error: Error while evaluating a Function Call, Duplicate declaration: Ini_setting[/tmp/foo.ini [section2] setting3] is already declared; cannot redeclare at /home/rauch/Scratch/puppetlabs-inifile/spec/fixtures/modules/create_ini_settings_test/manifests/init.pp:16:3 on node xxxxxxxxxxxxx
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              rauch Robert Rauch
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Zendesk Support