apiserverk8s.io/apiserver/pkg/storage/etcd3/testserver Index | Files

package testserver

import "k8s.io/apiserver/pkg/storage/etcd3/testserver"

Index

Functions

func NewTestConfig

func NewTestConfig(t testing.TB) *embed.Config

NewTestConfig returns a configuration for an embedded etcd server. The configuration is based on embed.NewConfig(), with the following adjustments:

func RunEtcd

func RunEtcd(t testing.TB, cfg *embed.Config) *clientv3.Client

RunEtcd starts an embedded etcd server with the provided config (or NewTestConfig(t) if nil), and returns a client connected to the server. The server is terminated when the test ends.

Source Files

test_server.go

Version
v0.30.1
Published
May 15, 2024
Platform
js/wasm
Imports
12 packages
Last checked
2 minutes ago

Tools for package owners.