Sha256: b0cac047e6d16ecd1363b3d3ba4d2480026f31403b04fc6c93425ae663476fea

Contents?: true

Size: 815 Bytes

Versions: 1

Compression:

Stored size: 815 Bytes

Contents

# frozen_string_literal: true

class MockBaseClient
  STAGING_ENV_ID = 1
  PRODUCTION_ENV_ID = 2
  TEST_ENV_ID = 3
  attr_reader :namespace, :logger, :config_client, :options, :posts

  def initialize(options = Prefab::Options.new)
    @options = options
    @namespace = namespace
    @logger = Prefab::LoggerClient.new($stdout)
    @config_client = MockConfigClient.new
    @posts = []
  end

  def instance_hash
    'mock-base-client-instance-hash'
  end

  def project_id
    1
  end

  def post(_, _)
    raise 'Use wait_for_post_requests'
  end

  def log
    @logger
  end

  def log_internal(level, msg, path = nil, **tags); end

  def context_shape_aggregator; end

  def evaluation_summary_aggregator; end

  def example_contexts_aggregator; end

  def config_value(key)
    @config_values[key]
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
prefab-cloud-ruby-1.1.2 test/support/mock_base_client.rb