Skip to content

Commit b299859

Browse files
committed
Adapt tests to CUE v0.12.0
Signed-off-by: Stefan Prodan <[email protected]>
1 parent 58fe292 commit b299859

File tree

7 files changed

+46
-26
lines changed

7 files changed

+46
-26
lines changed

cmd/timoni/bundle_vet_test.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -257,16 +257,16 @@ bundle:
257257
}
258258
namespace: "podinfo"
259259
values: {
260+
autoscaling: {
261+
enabled: true
262+
}
260263
caching: {
261264
enabled: true
262265
redisURL: "tcp://:[email protected]:6379"
263266
}
264267
monitoring: {
265268
enabled: true
266269
}
267-
autoscaling: {
268-
enabled: true
269-
}
270270
}
271271
}
272272
}
@@ -362,11 +362,11 @@ runtime: {
362362
}
363363
namespace: "fleet-test"
364364
values: {
365-
message: "Hello from cluster staging"
366-
replicas: 2
365+
message: "Hello from cluster staging"
367366
test: {
368367
enabled: true
369368
}
369+
replicas: 2
370370
}
371371
}
372372
}
@@ -382,11 +382,11 @@ runtime: {
382382
}
383383
namespace: "fleet-test"
384384
values: {
385-
message: "Hello from cluster production"
386-
replicas: 3
385+
message: "Hello from cluster production"
387386
test: {
388387
enabled: true
389388
}
389+
replicas: 3
390390
}
391391
}
392392
}

cmd/timoni/testdata/crd/golden/cue.mod/gen/acme.cert-manager.io/challenge/v1/types_gen.cue

+6-2
Original file line numberDiff line numberDiff line change
@@ -408,14 +408,18 @@ import "strings"
408408
// group (such as for a "Service" kind referent), Group must be
409409
// explicitly set to "" (empty string).
410410
// Support: Core
411-
group?: strings.MaxRunes(253) & =~"^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" | *"gateway.networking.k8s.io"
411+
group?: strings.MaxRunes(253) & {
412+
=~"^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$"
413+
}
412414

413415
// Kind is kind of the referent.
414416
// There are two kinds of parent resources with "Core" support:
415417
// * Gateway (Gateway conformance profile) * Service (Mesh
416418
// conformance profile, experimental, ClusterIP Services only)
417419
// Support for other resources is Implementation-Specific.
418-
kind?: strings.MaxRunes(63) & strings.MinRunes(1) & =~"^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$" | *"Gateway"
420+
kind?: strings.MaxRunes(63) & strings.MinRunes(1) & {
421+
=~"^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$"
422+
}
419423

420424
// Name is the name of the referent.
421425
// Support: Core

cmd/timoni/testdata/crd/golden/cue.mod/gen/cert-manager.io/clusterissuer/v1/types_gen.cue

+6-2
Original file line numberDiff line numberDiff line change
@@ -492,14 +492,18 @@ import "strings"
492492
// group (such as for a "Service" kind referent), Group must be
493493
// explicitly set to "" (empty string).
494494
// Support: Core
495-
group?: strings.MaxRunes(253) & =~"^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" | *"gateway.networking.k8s.io"
495+
group?: strings.MaxRunes(253) & {
496+
=~"^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$"
497+
}
496498

497499
// Kind is kind of the referent.
498500
// There are two kinds of parent resources with "Core" support:
499501
// * Gateway (Gateway conformance profile) * Service (Mesh
500502
// conformance profile, experimental, ClusterIP Services only)
501503
// Support for other resources is Implementation-Specific.
502-
kind?: strings.MaxRunes(63) & strings.MinRunes(1) & =~"^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$" | *"Gateway"
504+
kind?: strings.MaxRunes(63) & strings.MinRunes(1) & {
505+
=~"^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$"
506+
}
503507

504508
// Name is the name of the referent.
505509
// Support: Core

cmd/timoni/testdata/crd/golden/cue.mod/gen/cert-manager.io/issuer/v1/types_gen.cue

+6-2
Original file line numberDiff line numberDiff line change
@@ -491,14 +491,18 @@ import "strings"
491491
// group (such as for a "Service" kind referent), Group must be
492492
// explicitly set to "" (empty string).
493493
// Support: Core
494-
group?: strings.MaxRunes(253) & =~"^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" | *"gateway.networking.k8s.io"
494+
group?: strings.MaxRunes(253) & {
495+
=~"^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$"
496+
}
495497

496498
// Kind is kind of the referent.
497499
// There are two kinds of parent resources with "Core" support:
498500
// * Gateway (Gateway conformance profile) * Service (Mesh
499501
// conformance profile, experimental, ClusterIP Services only)
500502
// Support for other resources is Implementation-Specific.
501-
kind?: strings.MaxRunes(63) & strings.MinRunes(1) & =~"^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$" | *"Gateway"
503+
kind?: strings.MaxRunes(63) & strings.MinRunes(1) & {
504+
=~"^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$"
505+
}
502506

503507
// Name is the name of the referent.
504508
// Support: Core

cmd/timoni/testdata/crd/golden/cue.mod/gen/flagger.app/canary/v1beta1/types_gen.cue

+15-7
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ import (
201201

202202
// MaxAge indicates the number of seconds until the session
203203
// affinity cookie will expire.
204-
maxAge?: number | *86400
204+
maxAge?: number
205205
}
206206

207207
// Incremental traffic step weight for the analysis phase
@@ -343,9 +343,13 @@ import (
343343

344344
// The list of parent Gateways for a HTTPRoute
345345
gatewayRefs?: list.MaxItems(32) & [...{
346-
group?: strings.MaxRunes(253) & =~"^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" | *"gateway.networking.k8s.io"
347-
kind?: strings.MaxRunes(63) & strings.MinRunes(1) & =~"^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$" | *"Gateway"
348-
name!: strings.MaxRunes(253) & strings.MinRunes(1)
346+
group?: strings.MaxRunes(253) & {
347+
=~"^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$"
348+
}
349+
kind?: strings.MaxRunes(63) & strings.MinRunes(1) & {
350+
=~"^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$"
351+
}
352+
name!: strings.MaxRunes(253) & strings.MinRunes(1)
349353
namespace?: strings.MaxRunes(63) & strings.MinRunes(1) & {
350354
=~"^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
351355
}
@@ -564,9 +568,13 @@ import (
564568
// Mirror defines a schema for a filter that mirrors requests.
565569
mirror?: [...{
566570
backendRef?: {
567-
group?: strings.MaxRunes(253) & =~"^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" | *""
568-
kind?: strings.MaxRunes(63) & strings.MinRunes(1) & =~"^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$" | *"Service"
569-
name!: strings.MaxRunes(253) & strings.MinRunes(1)
571+
group?: strings.MaxRunes(253) & {
572+
=~"^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$"
573+
}
574+
kind?: strings.MaxRunes(63) & strings.MinRunes(1) & {
575+
=~"^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$"
576+
}
577+
name!: strings.MaxRunes(253) & strings.MinRunes(1)
570578
namespace?: strings.MaxRunes(63) & strings.MinRunes(1) & {
571579
=~"^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
572580
}

internal/engine/testdata/module-golden/overlay.cue

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ objects: [{
77
}
88
data: {
99
url: "https://test.internal"
10-
kubeVersion: "1.25.3"
1110
moduleVersion: "0.0.0-devel"
11+
kubeVersion: "1.25.3"
1212
}
1313
}]

internal/engine/testdata/values/golden.cue

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
values: {
22
securityContext: {
3-
seccompProfile: {
4-
type: "RuntimeDefault"
5-
}
6-
readOnlyRootFilesystem: false
73
allowPrivilegeEscalation: false
8-
runAsNonRoot: true
94
capabilities: {
105
add: ["NET_BIND_SERVICE"]
116
drop: ["ALL"]
127
}
8+
readOnlyRootFilesystem: false
9+
runAsNonRoot: true
10+
seccompProfile: {
11+
type: "RuntimeDefault"
12+
}
1313
}
1414
resources: {
1515
limits: {

0 commit comments

Comments
 (0)