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.T) *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.T, 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.25.16
Published
Nov 16, 2023
Platform
js/wasm
Imports
12 packages
Last checked
3 minutes ago

Tools for package owners.