From e46316d60f12e6421849fff9e4bdc93c7c73e186 Mon Sep 17 00:00:00 2001 From: Thom Carlin Date: Thu, 5 Sep 2024 15:02:41 -0400 Subject: [PATCH] Add getaddr null backend test --- pkg/backends/null_test.go | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 pkg/backends/null_test.go diff --git a/pkg/backends/null_test.go b/pkg/backends/null_test.go new file mode 100644 index 000000000..61f432004 --- /dev/null +++ b/pkg/backends/null_test.go @@ -0,0 +1,32 @@ +package backends + +import "testing" + +func TestNullBackendCfgGetAddr(t *testing.T) { + type fields struct { + Local bool + } + tests := []struct { + name string + fields fields + want string + }{ + { + name: "Positive", + fields: fields{ + Local: true, + }, + want: "", + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + cfg := &NullBackendCfg{ + Local: tt.fields.Local, + } + if got := cfg.GetAddr(); got != tt.want { + t.Errorf("NullBackendCfg.GetAddr() = %v, want %v", got, tt.want) + } + }) + } +}