Warnings indicating ignored and replaced parameters (#14962)

* Warnings indicating ignored and replaced parameters

* Avoid additional var creation

* Add warnings only if the response is non-nil

* Return the response even when error is non-nil

* Fix tests

* Rearrange comments

* Print warning in the log

* Fix another test

* Add CL
This commit is contained in:
Vishal Nayak
2022-04-11 09:57:12 -04:00
committed by GitHub
parent f258885f7a
commit fd73653b9d
5 changed files with 88 additions and 4 deletions

View File

@@ -689,7 +689,7 @@ func TestBackend_connectionCrud(t *testing.T) {
if err != nil || (resp != nil && resp.IsError()) {
t.Fatalf("err:%s resp:%#v\n", err, resp)
}
if len(resp.Warnings) != 1 {
if len(resp.Warnings) == 0 {
t.Fatalf("expected warning about password in url %s, resp:%#v\n", connURL, resp)
}