Puppet: System Administration Automated

Support

Ticket #1252 (closed defect: fixed)

Opened 6 months ago

Last modified 6 months ago

ssh_authorized_key unit tests broken when run against master

Reported by: plathrop Assigned to: luke
Priority: high Milestone:
Component: testing Version:
Severity: normal Keywords:
Cc: Triage Stage: Needs more info
Attached Patches: None Complexity: Easy

Description

ssh_authorized_key unit tests broken when run against master branch. The current tests rely on calling the clear() method, which raises a Runtime Error? ""Global resource removal is deprecated"

Change History

05/22/08 02:05:34 changed by plathrop

  • owner changed from community to plathrop.
  • priority changed from normal to high.
  • complexity changed from Unknown to Easy.
  • status changed from new to assigned.
  • stage changed from Unreviewed to Accepted.

05/22/08 02:08:46 changed by plathrop

It seems like a lot of the methods defined by lib/puppet/metatype/instances.rb are deprecated in the master branch. What is supposed to replace them? I can't see a good way of testing this type without the ability to clear out resources between tests. If tests hadn't existed and the clear() method wasn't written, I would have written it specifically for the tests!

I'd love to fix this (it would clear several broken tests on master branch) but I'm not sure why this was deprecated, and what should be used instead. Any hints?

05/22/08 08:51:56 changed by jamtur01

  • owner changed from plathrop to luke.
  • status changed from assigned to new.
  • stage changed from Accepted to Needs more info.

05/22/08 10:41:01 changed by porridge

looks like a duplicate of #1245

05/26/08 00:05:00 changed by luke

  • status changed from new to closed.
  • resolution set to duplicate.

Duplicate of #1245.

05/26/08 00:06:34 changed by luke

  • status changed from closed to reopened.
  • resolution deleted.

Sorry; I didn't realize the other one had been closed in favor of this. Please mark both tickets when closing one as a dupe.

05/26/08 00:08:11 changed by luke

  • status changed from reopened to closed.
  • resolution set to fixed.

Fixed in [447507c].

Nothing replaces those methods -- the master branch no longer keeps global references to resource instances. Only catalogs keep these references, and they're not global.

I've left the methods in for now, so that the errors are more meaningful (i.e., a deprecation notice rather than a method_missing error). I expect we'll remove them in the second or third point release of this branch.