load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "server", srcs = [ "certs.go", "reset.go", ], importpath = "edge-infra.dev/pkg/sds/lib/etcd/server", visibility = ["//visibility:public"], deps = [ "//pkg/lib/crypto/certs/x509", "//pkg/sds/lib/containerd", "//pkg/sds/lib/dbus/systemd", "//pkg/sds/lib/k8s/manifest", "@io_k8s_api//core/v1:core", "@io_k8s_apimachinery//pkg/apis/meta/v1:meta", "@io_k8s_apimachinery//pkg/runtime", ], ) go_test( name = "server_test", srcs = ["reset_test.go"], data = glob(["testdata/**"]), embed = [":server"], embedsrcs = [ "testdata/etcd-with-fnc.yaml", "testdata/etcd-without-fnc.yaml", ], deps = [ "//pkg/sds/lib/containerd", "//pkg/sds/lib/containerd/mocks", "//pkg/sds/lib/dbus/systemd", "//pkg/sds/lib/dbus/systemd/mocks", "//pkg/sds/lib/k8s/manifest", "@com_github_go_logr_logr//testr", "@com_github_golang_mock//gomock", "@com_github_spf13_afero//:afero", "@com_github_stretchr_testify//assert", "@com_github_stretchr_testify//require", "@io_k8s_api//core/v1:core", "@io_k8s_sigs_controller_runtime//:controller-runtime", ], )