ipld-eth-beacon-indexer/pkg/testhelpers/test_helper.go
Abdul Rabbani e2f7fa381b
Utilize Ginkgo toreplace testing library, and add CI/CD. (#9)
* 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
2022-04-22 08:28:01 -04:00

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
}