MCPcopy Index your code
hub / github.com/google/seesaw / compareChecks

Function compareChecks

engine/vserver_test.go:1688–1704  ·  view source on GitHub ↗
(got, want map[CheckKey]*check)

Source from the content-addressed store, hash-verified

1686}
1687
1688func compareChecks(got, want map[CheckKey]*check) []error {
1689 errs := make([]error, 0)
1690 if len(got) != len(want) {
1691 errs = append(errs, fmt.Errorf("Got %d checks, want %d", len(got), len(want)))
1692 return errs
1693 }
1694 for k := range want {
1695 if _, ok := got[k]; !ok {
1696 errs = append(errs, fmt.Errorf("Expected check %v, not found", k))
1697 continue
1698 }
1699 if *got[k].healthcheck != *want[k].healthcheck {
1700 errs = append(errs, fmt.Errorf("Got check %#+v, want %#+v", *got[k].healthcheck, *want[k].healthcheck))
1701 }
1702 }
1703 return errs
1704}
1705
1706func compareServiceStates(want []*service, got map[serviceKey]*service) []error {
1707 var errs []error

Callers 1

TestUpdateVserverFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected