k3s/tests/fixtures/etcd.go
Brad Davidson d300004f29
Some checks are pending
govulncheck / govulncheck (push) Waiting to run
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
Improve resilience of datastore bootstrap reconcile from etcd
* Add store tests with fixtures
* Try connecting to local etcd first, if it is available
* Handle panics from etcd backend code
* Don't try to read WAL and restore v3 snapshots as they almost never exist

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2026-02-26 10:13:04 -08:00

22 lines
338 B
Go

package fixtures
import (
"archive/zip"
"bytes"
_ "embed"
"io/fs"
"github.com/spf13/afero"
"github.com/spf13/afero/zipfs"
)
//go:embed etcd/member.zip
var member []byte
var ETCD fs.FS
func init() {
if r, err := zip.NewReader(bytes.NewReader(member), int64(len(member))); err == nil {
ETCD = afero.NewIOFS(zipfs.New(r))
}
}