utils

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FabricEndpoint     = "http://localhost:7054"
	EthConnectEndpoint = "http://localhost:8080"
	EvmConnectEndpoint = "http://localhost:5008"
)

Functions

func CaptureOutput

func CaptureOutput() (*os.File, *bytes.Buffer)

CaptureOutput redirects the standard output to a buffer and returns the original output writer and the captured output.

func Equals

func Equals(tb testing.TB, exp, act interface{})

checks if exp value and act value are equal

func ReadFileToString

func ReadFileToString(filePath string) (string, error)

ReadFileToString reads the contents of a file and returns it as a string.

func StartMockServer

func StartMockServer(t *testing.T)

func StopMockServer

func StopMockServer(_ *testing.T)

Types

type TestHelper

type TestHelper struct {
	FabricURL     string
	EthConnectURL string
	EvmConnectURL string
}

func NewTestEndPoint

func NewTestEndPoint(t *testing.T) *TestHelper

mockprotocol endpoints for testing

Jump to

Keyboard shortcuts

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