Remove redundant test
This commit is contained in:
parent
c09b871a6b
commit
4de19805ba
@ -6,8 +6,6 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v2/metadata"
|
|
||||||
|
|
||||||
"github.com/micro/go-micro/v2/auth"
|
"github.com/micro/go-micro/v2/auth"
|
||||||
"github.com/micro/go-micro/v2/auth/rules"
|
"github.com/micro/go-micro/v2/auth/rules"
|
||||||
pb "github.com/micro/go-micro/v2/auth/service/proto"
|
pb "github.com/micro/go-micro/v2/auth/service/proto"
|
||||||
@ -15,6 +13,7 @@ import (
|
|||||||
"github.com/micro/go-micro/v2/auth/token/jwt"
|
"github.com/micro/go-micro/v2/auth/token/jwt"
|
||||||
"github.com/micro/go-micro/v2/client"
|
"github.com/micro/go-micro/v2/client"
|
||||||
log "github.com/micro/go-micro/v2/logger"
|
log "github.com/micro/go-micro/v2/logger"
|
||||||
|
"github.com/micro/go-micro/v2/metadata"
|
||||||
"github.com/micro/go-micro/v2/util/jitter"
|
"github.com/micro/go-micro/v2/util/jitter"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,26 +0,0 @@
|
|||||||
package service
|
|
||||||
|
|
||||||
import (
|
|
||||||
"testing"
|
|
||||||
|
|
||||||
pb "github.com/micro/go-micro/v2/auth/service/proto"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestListRulesSorting(t *testing.T) {
|
|
||||||
s := &svc{
|
|
||||||
rules: []*pb.Rule{
|
|
||||||
&pb.Rule{Priority: 1},
|
|
||||||
&pb.Rule{Priority: 3},
|
|
||||||
&pb.Rule{Priority: 2},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
var priorities []int32
|
|
||||||
for _, r := range s.listRules() {
|
|
||||||
priorities = append(priorities, r.Priority)
|
|
||||||
}
|
|
||||||
|
|
||||||
if priorities[0] != 1 || priorities[1] != 2 || priorities[2] != 3 {
|
|
||||||
t.Errorf("Incorrect Rule Sequence")
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user