Skip to content
Snippets Groups Projects
Commit 9b2f55a0 authored by Daniel Czerwonk's avatar Daniel Czerwonk
Browse files

redone helper_test tests

parent 0d2c721d
No related branches found
No related tags found
No related merge requests found
package filter package filter
/*func TestNewAcceptAllFilter(t *testing.T) { import (
f := NewAcceptAllFilter() "testing"
m := &clientMock{} "github.com/bio-routing/bio-rd/net"
f.Register(m) "github.com/bio-routing/bio-rd/route"
"github.com/stretchr/testify/assert"
)
f.AddPath(net.NewPfx(0, 0), &route.Path{}) func TestNewAcceptAllFilter(t *testing.T) {
f := NewAcceptAllFilter()
if !m.addPathCalled { _, reject := f.ProcessTerms(net.NewPfx(0, 0), &route.Path{})
t.Fatalf("expected accepted, but was filtered") assert.Equal(t, false, reject)
}
} }
func TestNewDrainFilter(t *testing.T) { func TestNewDrainFilter(t *testing.T) {
f := NewDrainFilter() f := NewDrainFilter()
m := &clientMock{} _, reject := f.ProcessTerms(net.NewPfx(0, 0), &route.Path{})
f.Register(m) assert.Equal(t, true, reject)
}
f.AddPath(net.NewPfx(0, 0), &route.Path{})
if m.addPathCalled {
t.Fatalf("expected filtered, but was accepted")
}
}*/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment