Ginkgo testing helpers to make infrastructure tests simpler and more comprehensible.
Import this module into your Ginkgo/Gomega based testing suites.
import (
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/sueddeutsche/plat-testing-helpers"
)
var _ = Describe("my test context", func() {
longString := "hello big and nice world"
It("should do a test case", func() {
ExpectSubstrings(longString, "hello", "nice", "world") // passes
ExpectMissingSubstrings(longString, "bad people") // passes
})
})
go mod tidy && go test
go get github.com/sueddeutsche/plat-testing-helpers@latest