diff options
author | 2025-01-30 04:36:14 -0500 | |
---|---|---|
committer | 2025-01-30 17:14:26 +0000 | |
commit | 82cd81ade65e0e29f8e1a908c0b92aa0d6895aaf (patch) | |
tree | a378db64079effed9e4a9a46173afc5c26018b0c /extras | |
parent | 9df756c324a8136c89f045df53f23449fb0ee412 (diff) |
hs-test: fix broken test
AssertContains and AssertNotContains are now case insensitive to
prevent issues like in HttpPersistentConnectionTest.
Type: test
Change-Id: Ic52e3fa5a7d1d5cb8486e86aa39a845cbd911d94
Signed-off-by: Matus Fabian <matfabia@cisco.com>
(cherry picked from commit d38c132883ac6e9f726fed7f5a533288a5932058)
Diffstat (limited to 'extras')
-rw-r--r-- | extras/hs-test/infra/hst_suite.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/extras/hs-test/infra/hst_suite.go b/extras/hs-test/infra/hst_suite.go index 78cabb3eae9..d91958e33d9 100644 --- a/extras/hs-test/infra/hst_suite.go +++ b/extras/hs-test/infra/hst_suite.go @@ -327,11 +327,11 @@ func (s *HstSuite) AssertNotEqual(expected, actual interface{}, msgAndArgs ...in } func (s *HstSuite) AssertContains(testString, contains interface{}, msgAndArgs ...interface{}) { - ExpectWithOffset(2, testString).To(ContainSubstring(fmt.Sprint(contains)), msgAndArgs...) + ExpectWithOffset(2, strings.ToLower(fmt.Sprint(testString))).To(ContainSubstring(strings.ToLower(fmt.Sprint(contains))), msgAndArgs...) } func (s *HstSuite) AssertNotContains(testString, contains interface{}, msgAndArgs ...interface{}) { - ExpectWithOffset(2, testString).ToNot(ContainSubstring(fmt.Sprint(contains)), msgAndArgs...) + ExpectWithOffset(2, strings.ToLower(fmt.Sprint(testString))).ToNot(ContainSubstring(strings.ToLower(fmt.Sprint(contains))), msgAndArgs...) } func (s *HstSuite) AssertEmpty(object interface{}, msgAndArgs ...interface{}) { |