Skip to content

Commit

Permalink
Use storage namespace in index cleaner test (#382)
Browse files Browse the repository at this point in the history
* Fix race condition in test, remove hard-coded namespace

Signed-off-by: Kevin Earls <kearls@redhat.com>

* Update if statement

Signed-off-by: Kevin Earls <kearls@redhat.com>

* simplify if statement

Signed-off-by: Kevin Earls <kearls@redhat.com>
  • Loading branch information
kevinearls authored and pavolloffay committed May 3, 2019
1 parent 7aec8ad commit 945569d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion test/e2e/es_index_cleaner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func esIndexCleanerTest(t *testing.T, f *framework.Framework, testCtx *framework
return err
}

esPod, err := GetPod("default", "elasticsearch", "elasticsearch", f.KubeClient)
esPod, err := GetPod(storageNamespace, "elasticsearch", "elasticsearch", f.KubeClient)
if err != nil {
return err
}
Expand Down
6 changes: 2 additions & 4 deletions test/e2e/smoketest.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,10 @@ func SmokeTest(apiTracesEndpoint, collectorEndpoint, serviceName string, interva
bodyBytes, err := ioutil.ReadAll(resp.Body)
bodyString := string(bodyBytes)


if !strings.Contains(bodyString, "errors\":null") {
return false, errors.New("query service returns errors")
}
if !strings.Contains(bodyString, tStr) {
return false, errors.New("query service does not return spans")
}
return true, nil
return strings.Contains(bodyString, tStr), nil
})
}

0 comments on commit 945569d

Please sign in to comment.