1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-12-05 21:56:14 +02:00

table package is no more. Cleaned up unnecessary code, too.

This commit is contained in:
Milos Gajdos
2019-07-25 23:19:05 +01:00
parent 4e27aac398
commit e22c4b4c07
10 changed files with 143 additions and 244 deletions

View File

@@ -0,0 +1,24 @@
package router
import "testing"
func TestHash(t *testing.T) {
route1 := Route{
Service: "dest.svc",
Gateway: "dest.gw",
Network: "dest.network",
Link: "det.link",
Metric: 10,
}
// make a copy
route2 := route1
route1Hash := route1.Hash()
route2Hash := route2.Hash()
// we should get the same hash
if route1Hash != route2Hash {
t.Errorf("identical routes result in different hashes")
}
}