如何测试 Puppet 类型的只读 属性

How to test readonly property of Puppet type

我的 Puppet 类型定义如下:

Puppet::Type.newtype(:my_type) do
  newproperty(:id, :readonly => true) do
    desc "Some id."
  end
end

我想问一下如何在 rspecs 中测试 属性 :id 是只读的?

describe Puppet::Type.type(:netapp_e_volume) do
  it 'should have readonly :id attribute' do
    # this part I don't have
  end
end

截至 2016 年 4 月,根据此 Puppet Jira Ticket,这仍然是不可能的

https://tickets.puppetlabs.com/browse/PUP-5624

tickect 仍处于未解决状态