Documentation
¶
Overview ¶
Package tests implements a suite of tests for certmagic.Storage
Example Usage:
package storage
import (
tests "github.com/oyato/certmagic-storage-tests" "testing"
)
func TestStorage(t *testing.T) {
// set up your storage
storage := NewInstanceOfYourStorage()
// then run the tests on it
tests.NewTestSuite(storage).Run(t)
}
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var KeyPrefix = "__test__key__"
KeyPrefix is prepended to all tested keys. If changed, it must not contain a forward slash (/)
Functions ¶
This section is empty.
Types ¶
type Suite ¶
type Suite struct {
S certmagic.Storage
Rng interface{ Int() int }
// contains filtered or unexported fields
}
Suite implements tests for certmagic.Storage.
Users should call Suite.Run() in their storage_test.go file.
func NewTestSuite ¶
NewTestSuite returns a new Suite initalised with storage s and a `rand.New(rand.NewSource(0))` random number generator
Click to show internal directories.
Click to hide internal directories.