Skip to content

Commit

Permalink
Add getaddr null backend test (#1138)
Browse files Browse the repository at this point in the history
  • Loading branch information
thom-at-redhat authored Sep 5, 2024
1 parent 58b85cc commit 81fca68
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions pkg/backends/null_test.go
Original file line number Diff line number Diff line change
@@ -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)
}
})
}
}

0 comments on commit 81fca68

Please sign in to comment.