Files
Antonin StefanuttiandGitHub 03969c9217 [CI]: Kuberay operator e2e tests (#1575)
This PR adds e2e tests for the operator, following up #1539 (comment).

This e2e testing enables to assert Kuberay resources, in a way that cannot be achieved with existing tests (envtest).

The e2e tests execution output is post-processed using gotestfmt:

The logs and events are gathered and uploaded are part of the workflow run:
2023-11-07 09:57:52 -08:00

26 lines
403 B
Go

package support
import (
"io/fs"
"os"
"path"
"github.com/onsi/gomega"
)
func Ptr[T any](v T) *T {
return &v
}
type OutputType string
const (
Log OutputType = "log"
)
func WriteToOutputDir(t Test, fileName string, fileType OutputType, data []byte) {
t.T().Helper()
t.Expect(os.WriteFile(path.Join(t.OutputDir(), fileName+"."+string(fileType)), data, fs.ModePerm)).
To(gomega.Succeed())
}