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) *kubernetes.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.33.1 (latest)
Published
May 15, 2025
Platform
linux/amd64
Imports
14 packages
Last checked
16 hours ago

Tools for package owners.