Sha256: d1d2557f9cf1a43b2972b55427a87d04a3483e39f50d7db79175d8f75f4879de

Contents?: true

Size: 1.05 KB

Versions: 1

Compression:

Stored size: 1.05 KB

Contents

# encoding: utf-8
require "logstash/devutils/rspec/spec_helper"
require_relative "supports/helpers"
require "logstash/logging/logger"
require "fog/openstack"

LogStash::Logging::Logger::configure_logging("debug") if ENV["DEBUG"]

module Fog
  module Storage
    class OpenStack

      class Mock

        def put_object(container, object, data, options = {}, &block)
          response = Excon::Response.new
          response.status = 201
          response.body = ""
          response
        end

        def put_container(name, options = {})
          response = Excon::Response.new
          response.status = 201
          response.body = ""
          response
        end

        def get_container(container, options = {})
          response = Excon::Response.new
          response.status = 201
          response.body = []
          response
        end

        def get_containers(options = {})
          response = Excon::Response.new
          response.status = 201
          response.body = []
          response
        end
      end

    end
  end
end

Fog.mock!

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
logstash-output-swift-0.1 spec/spec_helper.rb