tests

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package tests contains common storage tests and some test utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RetryUntilAvailable

func RetryUntilAvailable(t *testing.T, serviceName, addr string, f func(ctx context.Context) error)

RetryUntilAvailable calls callback repeatedly until callback return nil error or until test timeout will be reached.

func TestStorage

func TestStorage(t *testing.T, storage session.Storage, cred Credentials)

TestStorage runs different tests for given implementations.

Types

type Credentials

type Credentials interface {
	auth.Credentials
	SavePhone(ctx context.Context, phone string) error
	SavePassword(ctx context.Context, password string) error
}

Credentials is a KV credential storage abstraction.

Jump to

Keyboard shortcuts

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