Exemplo n.º 1
0
Arquivo: e2e.go Projeto: spxtr/contrib
// Init does construction-- call once it after setting the public fields of 'e'.
// adminMux may be nil, in which case handlers for the resolution tracker won't
// be installed.
func (e *RealE2ETester) Init(adminMux HTTPHandlerInstaller) *RealE2ETester {
	e.flakeCache = cache.NewCache(e.getGCSResult)
	e.resolutionTracker = NewResolutionTracker()
	if adminMux != nil {
		adminMux.HandleFunc("/api/mark-resolved", e.resolutionTracker.SetHTTP)
		adminMux.HandleFunc("/api/is-resolved", e.resolutionTracker.GetHTTP)
		adminMux.HandleFunc("/api/list-resolutions", e.resolutionTracker.ListHTTP)
	}
	return e
}
Exemplo n.º 2
0
// Init does construction-- call once it after setting the public fields of 'e'.
func (e *RealE2ETester) Init() *RealE2ETester {
	e.flakeCache = cache.NewCache(e.getGCSResult)
	return e
}