Make the testKeys extractions methods more robust

This commit is contained in:
Arturo Filastò 2018-09-27 11:40:57 +02:00
commit 1879f8e961
9 changed files with 128 additions and 52 deletions

View file

@ -93,7 +93,7 @@ type WebConnectivityTestKeys struct {
}
// GetTestKeys generates a summary for a test run
func (n WebConnectivity) GetTestKeys(tk map[string]interface{}) interface{} {
func (n WebConnectivity) GetTestKeys(tk map[string]interface{}) (interface{}, error) {
var (
blocked bool
blocking string
@ -124,7 +124,7 @@ func (n WebConnectivity) GetTestKeys(tk map[string]interface{}) interface{} {
Accessible: accessible,
Blocking: blocking,
IsAnomaly: blocked,
}
}, nil
}
// LogSummary writes the summary to the standard output