<commit_before>package ginkgo

import (
	"fmt"
	"math/rand"

	"github.com/onsi/ginkgo/v2"
	"github.com/onsi/ginkgo/v2/types"

	"k8s.io/apimachinery/pkg/util/errors"

	"github.com/openshift/origin/test/extended/util/annotate/generated"
)

func testsForSuite() ([]*testCase, error) {
	var tests []*testCase
	var errs []error
	ginkgo.GetSuite().BuildTree()
	ginkgo.GetSuite().WalkTests(func(name string, spec types.TestSpec) {
		if append, ok := generated.Annotations[name]; ok {
			spec.AppendText(append)
		} else {
			panic(fmt.Sprintf("unable to find test %s", name))
		}
		tc, err := newTestCaseFromGinkgoSpec(spec)
		if err != nil {
			errs = append(errs, err)
		}
		tests = append(tests, tc)
	})
	if len(errs) > 0 {
		return nil, errors.NewAggregate(errs)
	}
	suiteConfig, _ := ginkgo.GinkgoConfiguration()<commit_msg>Do not panic when test annotation is not found<commit_after>package ginkgo

import (
	"math/rand"

	"github.com/onsi/ginkgo/v2"
	"github.com/onsi/ginkgo/v2/types"

	"k8s.io/apimachinery/pkg/util/errors"

	"github.com/openshift/origin/test/extended/util/annotate/generated"
)

func testsForSuite() ([]*testCase, error) {
	var tests []*testCase
	var errs []error
	ginkgo.GetSuite().BuildTree()
	ginkgo.GetSuite().WalkTests(func(name string, spec types.TestSpec) {
		if append, ok := generated.Annotations[name]; ok {
			spec.AppendText(append)
		}
		tc, err := newTestCaseFromGinkgoSpec(spec)
		if err != nil {
			errs = append(errs, err)
		}
		tests = append(tests, tc)
	})
	if len(errs) > 0 {
		return nil, errors.NewAggregate(errs)
	}
	suiteConfig, _ := ginkgo.GinkgoConfiguration()
{'fraction_non_alphanumeric': 0.1501557632398754, 'fraction_numerical': 0.004984423676012461, 'mean_word_length': 4.3533333333333335, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7428744', 'n_tokens_mistral': 663, 'n_tokens_neox': 626, 'n_words': 113}