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

redone helper_test tests

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