e2f7fa381b
* Utilize Ginkgo and replace `testing` library. * Add TOC to docs * Add Docker specific files * Remove -e * Update on-pr-manual.yml * Add depth * Add repositories * Remove $ from path * Update path for make * Setup Go and Ginkgo * Use go mod download * Use go install * Update on-pr-manual.yml * Use latest * Remove install of GINKGO * Add explicit gopath * Explicitly specify the gopath * Update on-pr-manual.yml * Update on-pr-manual.yml * Update on-pr-manual.yml * Update on-pr-manual.yml * Update on-pr-manual.yml * Update on-pr-manual.yml * Use which ginkgo * Try with make now * Final working Make
25 lines
525 B
Go
25 lines
525 B
Go
package testhelpers
|
|
|
|
import (
|
|
"fmt"
|
|
"reflect"
|
|
)
|
|
|
|
// ExpectEqual asserts the provided interfaces are deep equal
|
|
func IsEqual(got interface{}, want interface{}) (bool, error) {
|
|
if !reflect.DeepEqual(got, want) {
|
|
return false, fmt.Errorf("Expected: %v\nActual: %v", want, got)
|
|
}
|
|
return true, nil
|
|
}
|
|
|
|
// ListContainsString used to check if a list of strings contains a particular string
|
|
func ListContainsString(sss []string, s string) bool {
|
|
for _, str := range sss {
|
|
if s == str {
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|