Compare commits

..
Author SHA1 Message Date
panxiao81 7a972afaa6 test: ignore invalid embedlit suggestions
Verify / test (pull_request) Successful in 5m44s
Verify / lint (pull_request) Successful in 6m15s
2026-09-18 16:28:53 +00:00
panxiao81 5bd0455940 test: satisfy Go 1.27 modernization lint
Verify / test (pull_request) Failing after 5m11s
Verify / lint (pull_request) Failing after 6m5s
2026-09-17 19:06:39 +00:00
@@ -48,6 +48,7 @@ func TestJobCRDValidation(t *testing.T) {
t.Fatal(err)
}
ctx := context.Background()
//nolint:modernize // ObjectMeta is promoted through embedded TypeMeta; embedlit produces invalid Go here.
namespace := &corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: "api-validation"}}
if err := client.Create(ctx, namespace); err != nil {
t.Fatal(err)
@@ -70,6 +71,7 @@ func TestJobCRDValidation(t *testing.T) {
Name: "TOKEN",
Value: &literal,
ValueFrom: &executionv1alpha1.EnvVarSource{
//nolint:modernize // LocalObjectReference is an embedded Kubernetes API field.
SecretKeyRef: &corev1.SecretKeySelector{LocalObjectReference: corev1.LocalObjectReference{Name: "token"}, Key: "value"},
},
}}
@@ -106,6 +108,7 @@ func TestJobCRDValidation(t *testing.T) {
}
func validJob(name string) *executionv1alpha1.Job {
//nolint:modernize // ObjectMeta is promoted through embedded TypeMeta; embedlit produces invalid Go here.
return &executionv1alpha1.Job{
ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: "api-validation"},
Spec: executionv1alpha1.JobSpec{