heketitest

package
v3.1.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HeketiMockTestServer

type HeketiMockTestServer struct {
	DbFile string
	Ts     *httptest.Server
	App    *glusterfs.App
}

Heketi test service metadata

func NewHeketiMockTestServer

func NewHeketiMockTestServer(
	config *HeketiMockTestServerConfig) *HeketiMockTestServer

Create a Heketi mock server

Example:

c := &heketitest.HeketiMockTestServerConfig{
	Auth:     true,
	AdminKey: "admin",
	UserKey:  "user",
    Logging: false,
}

h := heketitest.NewHeketiMockTestServer(c)
defer h.Close()

func NewHeketiMockTestServerDefault

func NewHeketiMockTestServerDefault() *HeketiMockTestServer

Create a simple Heketi mock server

Example:

    	h := heketitest.NewHeketiMockTestServerDefault()
		defer h.Close()

func (*HeketiMockTestServer) Close

func (h *HeketiMockTestServer) Close()

Close database and other services

func (*HeketiMockTestServer) HttpServer

func (h *HeketiMockTestServer) HttpServer() *httptest.Server

Get http test service struct

func (*HeketiMockTestServer) URL

func (h *HeketiMockTestServer) URL() string

Get URL to test server

type HeketiMockTestServerConfig

type HeketiMockTestServerConfig struct {
	Auth     bool
	AdminKey string
	UserKey  string
	Logging  bool
}

Heketi test server configuration

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL