Skip to content

Commit

Permalink
Should not throw FATAL error and instead just warn and proceed to do …
Browse files Browse the repository at this point in the history
…full test.
  • Loading branch information
mdsauce committed Feb 26, 2019
1 parent 8b7fd07 commit 01dd10e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
10 changes: 2 additions & 8 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,16 +279,10 @@ func checkProxy(rawProxy string) {
} else {
log.WithFields(log.Fields{
"error": err,
"msg": "www.saucelabs.com not reachable with this proxy",
"resp": *resp,
}).Fatal("Something is wrong with the proxy specified in your environment variables. It cannot be used.")
"msg": "www.saucelabs.com not reachable.",
}).Warn("You may have no internet access or a proxy may be in use.")
}
}
if resp.StatusCode != 200 {
log.WithFields(log.Fields{
"response": *resp,
}).Fatal("Something is wrong with the proxy. It cannot was not able to reach a public website.")
}
log.Info("Proxy OK. Able to reach www.saucelabs.com.", resp)
}

Expand Down
6 changes: 4 additions & 2 deletions diagnostics/rdc_conns.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ func RDCServices(rdcEndpoints []string) {
if err != nil {
log.WithFields(log.Fields{
"error": err,
}).Fatalf("[ ] %s not reachable\n", endpoint)
}).Warnf("[ ] %s not reachable\n", endpoint)
}

respOutput(resp, endpoint)
if err == nil {
respOutput(resp, endpoint)
}
}
}
7 changes: 4 additions & 3 deletions diagnostics/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ func PublicSites(sitelist []string) {
if err != nil {
log.WithFields(log.Fields{
"error": err,
}).Fatalf("[ ] %s not reachable\n", site)
}).Warnf("[ ] %s not reachable\n", site)
}
if err == nil {
respOutput(resp, site)
}

respOutput(resp, site)
}
}

Expand Down
6 changes: 4 additions & 2 deletions diagnostics/vdc_conns.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ func VDCServices(sauceEndpoints []string) {
log.WithFields(log.Fields{
"error": err,
"endpoint": u,
}).Fatalf("[ ] %s not reachable\n", u)
}).Warnf("[ ] %s not reachable\n", u)
}

respOutput(resp, endpoint)
if err == nil {
respOutput(resp, endpoint)
}
}
}

Expand Down

0 comments on commit 01dd10e

Please sign in to comment.