Class: Storexplore::Testing::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/storexplore/testing/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



39
40
41
42
43
# File 'lib/storexplore/testing/configuration.rb', line 39

def initialize
  @logger = Logger.new(STDOUT)
  @logger.level = Logger::INFO
  @explore_store_items_timeout = 5*60
end

Instance Attribute Details

#explore_store_items_timeoutObject

Timeout for a the initial test exploration of the items of a store. By default, 5 minutes



67
68
69
# File 'lib/storexplore/testing/configuration.rb', line 67

def explore_store_items_timeout
  @explore_store_items_timeout
end

#loggerObject

Logger for custom test messages. By default, it logs to STDOUT with info level.



63
64
65
# File 'lib/storexplore/testing/configuration.rb', line 63

def logger
  @logger
end

Instance Method Details

#dummy_store_generation_dirObject

See #dummy_store_generation_dir=. Throws if no generation dir was previously set

Raises:

  • (StandardError)


56
57
58
59
# File 'lib/storexplore/testing/configuration.rb', line 56

def dummy_store_generation_dir
  raise StandardError.new('You need to configure a dummy store generation directory with Storexplore::Testing.config.dummy_store_generation_dir=') if @generation_dir.nil?
  @generation_dir
end

#dummy_store_generation_dir=(generation_dir) ⇒ Object

Sets the generation directory where the dummy stores will be generated. A sub folder with name Storexplore::DummyStoreConstants#NAME will be created there to holdvall generated dummy stores, the content of this directory will be deleted when the Storexplore::DummyStore#wipeout method is called. This setup is required to use Storexplore::Testing.



51
52
53
# File 'lib/storexplore/testing/configuration.rb', line 51

def dummy_store_generation_dir=(generation_dir)
  @generation_dir = generation_dir
end