hs-test: use assert-like approach in test cases

Type: test
Signed-off-by: Maros Ondrejicka <maros.ondrejicka@pantheon.tech>
Change-Id: I1653001461d4dfc52f1fb3a9e0cf458a506b8324
This commit is contained in:
Maros Ondrejicka
2022-12-06 15:38:05 +01:00
committed by Florin Coras
parent fe1fb3c31a
commit 98a91e8260
7 changed files with 83 additions and 153 deletions

View File

@ -45,6 +45,18 @@ func (s *HstSuite) assertEqual(expected, actual interface{}, msgAndArgs ...inter
}
}
func (s *HstSuite) assertNotEqual(expected, actual interface{}, msgAndArgs ...interface{}) {
if !assert.NotEqual(s.T(), expected, actual, msgAndArgs...) {
s.hstFail()
}
}
func (s *HstSuite) assertContains(testString, contains interface{}, msgAndArgs ...interface{}) {
if !assert.Contains(s.T(), testString, contains, msgAndArgs...) {
s.hstFail()
}
}
func (s *HstSuite) assertNotContains(testString, contains interface{}, msgAndArgs ...interface{}) {
if !assert.NotContains(s.T(), testString, contains, msgAndArgs...) {
s.hstFail()