Bug #12352

rspec tests issue: mock compute servers persisting between tests

Added by Dan Bode 4 months ago. Updated 3 months ago.

Status:Merged - Pending Release Start date:01/31/2012
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:- Spent time: -
Target version:1.0.2
Keywords: Branch:https://github.com/puppetlabs/puppetlabs-cloud-provisioner/pull/73
Votes: 0

Description

in spec/unit/puppet/cloudpack_spec.rb

section -actions – #create – with valid argument

the call to subject.create creates a mock compute server which is persisting beyond the scope where it is created.

This makes it difficult to run other tests that are assuming the mock server that they create is the only one.

In order to fix this, the method:

Fog::Compute::AWS::Mock.reset

should be called in an after :all block

History

Updated by Dan Bode 4 months ago

  • Status changed from Unreviewed to In Topic Branch Pending Review
  • Branch set to https://github.com/puppetlabs/puppetlabs-cloud-provisioner/pull/73

I decided to clean up all code to ensure that these mock servers do not persist between tests

Updated by Jeff McCune 3 months ago

  • Status changed from In Topic Branch Pending Review to Merged - Pending Release
  • Target version set to 1.0.2

Also available in: Atom PDF