aboutsummaryrefslogtreecommitdiffstats
path: root/extras/hs-test/framework_test.go
diff options
context:
space:
mode:
authorMaros Ondrejicka <maros.ondrejicka@pantheon.tech>2022-12-06 15:38:05 +0100
committerFlorin Coras <florin.coras@gmail.com>2022-12-07 16:05:20 +0000
commit98a91e82608e6e30d4516b52556cdaaa9837ee24 (patch)
tree2030a669ba4a70a2767cd8ca8fcce3f0e5c647d9 /extras/hs-test/framework_test.go
parentfe1fb3c31aa5f42c213eaa0c51f9d5a2cef07711 (diff)
hs-test: use assert-like approach in test cases
Type: test Signed-off-by: Maros Ondrejicka <maros.ondrejicka@pantheon.tech> Change-Id: I1653001461d4dfc52f1fb3a9e0cf458a506b8324
Diffstat (limited to 'extras/hs-test/framework_test.go')
-rwxr-xr-xextras/hs-test/framework_test.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/extras/hs-test/framework_test.go b/extras/hs-test/framework_test.go
index cfc38011ed5..3df509f30c1 100755
--- a/extras/hs-test/framework_test.go
+++ b/extras/hs-test/framework_test.go
@@ -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()