Skip to content

Commit

Permalink
Make etcd test linux-only
Browse files Browse the repository at this point in the history
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
  • Loading branch information
brandond committed Feb 7, 2025
1 parent 0d15457 commit 4cacf6e
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions pkg/etcd/etcd_test.go → pkg/etcd/etcd_linux_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build linux
// +build linux

package etcd

import (
Expand Down Expand Up @@ -80,7 +83,6 @@ func generateTestHandler() http.Handler {

func Test_UnitETCD_IsInitialized(t *testing.T) {
type args struct {
ctx context.Context
config *config.Control
}
tests := []struct {
Expand All @@ -94,7 +96,6 @@ func Test_UnitETCD_IsInitialized(t *testing.T) {
{
name: "directory exists",
args: args{
ctx: context.TODO(),
config: generateTestConfig(),
},
setup: func(cnf *config.Control) error {
Expand All @@ -113,7 +114,6 @@ func Test_UnitETCD_IsInitialized(t *testing.T) {
{
name: "directory does not exist",
args: args{
ctx: context.TODO(),
config: generateTestConfig(),
},
setup: func(cnf *config.Control) error {
Expand Down Expand Up @@ -160,7 +160,6 @@ func Test_UnitETCD_IsInitialized(t *testing.T) {

func Test_UnitETCD_Register(t *testing.T) {
type args struct {
ctx context.Context
config *config.Control
handler http.Handler
}
Expand All @@ -174,7 +173,6 @@ func Test_UnitETCD_Register(t *testing.T) {
{
name: "standard config",
args: args{
ctx: context.TODO(),
config: generateTestConfig(),
handler: generateTestHandler(),
},
Expand All @@ -189,7 +187,6 @@ func Test_UnitETCD_Register(t *testing.T) {
{
name: "with a tombstone file created",
args: args{
ctx: context.TODO(),
config: generateTestConfig(),
handler: generateTestHandler(),
},
Expand Down

0 comments on commit 4cacf6e

Please # to comment.