diff --git a/test/e2e/framework/test_context.go b/test/e2e/framework/test_context.go index afb7654ec2b..400a043077a 100644 --- a/test/e2e/framework/test_context.go +++ b/test/e2e/framework/test_context.go @@ -32,6 +32,7 @@ import ( "github.com/onsi/ginkgo/v2" "github.com/onsi/ginkgo/v2/reporters" "github.com/onsi/ginkgo/v2/types" + gomegaformat "github.com/onsi/gomega/format" restclient "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" @@ -307,6 +308,9 @@ func (tc TestContextType) ClusterIsIPv6() bool { // options themselves, copy flags from test/e2e/framework/config // as shown in HandleFlags. func RegisterCommonFlags(flags *flag.FlagSet) { + // The default is too low for objects like pods, even when using YAML. We double the default. + flags.IntVar(&gomegaformat.MaxLength, "gomega-max-length", 8000, "Sets the maximum size for the gomega formatter (= gomega.MaxLength). Use 0 to disable truncation.") + flags.StringVar(&TestContext.GatherKubeSystemResourceUsageData, "gather-resource-usage", "false", "If set to 'true' or 'all' framework will be monitoring resource usage of system all add-ons in (some) e2e tests, if set to 'master' framework will be monitoring master node only, if set to 'none' of 'false' monitoring will be turned off.") flags.BoolVar(&TestContext.GatherLogsSizes, "gather-logs-sizes", false, "If set to true framework will be monitoring logs sizes on all machines running e2e tests.") flags.IntVar(&TestContext.MaxNodesToGather, "max-nodes-to-gather-from", 20, "The maximum number of nodes to gather extended info from on test failure.")