Skip to content
This repository was archived by the owner on Aug 7, 2025. It is now read-only.
This repository was archived by the owner on Aug 7, 2025. It is now read-only.

empty param value in defined type test case #97

Description

@azalio

Thank you for the great software!
I use it to create a node test. Just change node to class and create a pseudo-class.
All works correct, but in case hash I got the empty hash.
For example:

    mysql::instance { '2' :
        desc => 'install_android',
        slab_alloc_arena => 100,
        snapshot_hours => "4+",
        memcached_enabled => true,
        spaces => [ { idx => 1, indexes => [
          { 'type' => 'HASH', unique => 1, keyfields => [ { fieldno => 0, 'type' => 'STR' } ] },
          { 'type' => 'TREE', unique => 0, keyfields => [ { fieldno => 3, 'type' => 'STR' } ] },
          { 'type' => 'TREE', unique => 0, keyfields => [ { fieldno => 4, 'type' => 'STR' } ] },
          { 'type' => 'TREE', unique => 0, keyfields => [ { fieldno => 6, 'type' => 'STR' } ] },
                       ]
         } ],
        init_lua_content => "dofile('/usr/local/etc/mysql/rbappgoals_install.lua')\n",
    }

Changed to:

  it do
    is_expected.to contain_mysql__instance('2').with(
      desc: 'install_android',
      slab_alloc_arena: '100',
      snapshot_hours: '4+',
      memcached_enabled: true,
      spaces: [{}],
      init_lua_content: "dofile('/usr/local/etc/mysql/rbappgoals_install.lua')\n",
    )
  end

And then a run the test rspec I got error because spaces variable is not empty.
Can you give me a hint, how I can fix it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions