()
| 26 | ) |
| 27 | |
| 28 | func main() { |
| 29 | e, err := evaluator.LoadPlugin("./testdata") |
| 30 | if err != nil { |
| 31 | fmt.Printf("load plugin error: %s\n", err) |
| 32 | os.Exit(1) |
| 33 | } |
| 34 | |
| 35 | candidateParents := e.EvaluateParents([]*standard.Peer{&standard.Peer{}}, &standard.Peer{}) |
| 36 | if len(candidateParents) != 1 { |
| 37 | fmt.Println("EvaluateParents failed") |
| 38 | os.Exit(1) |
| 39 | } |
| 40 | |
| 41 | if ok := e.IsBadParent(&standard.Peer{}); !ok { |
| 42 | fmt.Println("IsBadParent failed") |
| 43 | os.Exit(1) |
| 44 | } |
| 45 | |
| 46 | candidatePersistentCacheParents := e.EvaluatePersistentCacheParents([]*persistentcache.Peer{&persistentcache.Peer{}}, &persistentcache.Peer{}) |
| 47 | if len(candidatePersistentCacheParents) != 1 { |
| 48 | fmt.Println("EvaluatePersistentCacheParents failed") |
| 49 | os.Exit(1) |
| 50 | } |
| 51 | |
| 52 | if ok := e.IsBadPersistentCacheParent(&persistentcache.Peer{}); !ok { |
| 53 | fmt.Println("IsBadPersistentCacheParent failed") |
| 54 | os.Exit(1) |
| 55 | } |
| 56 | } |
nothing calls this directly
no test coverage detected