Skip to content

Commit 0cbe74e

Browse files
drich10cursoragent
andcommitted
test(carvel): add structured variable to sample-tile for round-trip coverage
Updates testdata/sample-tile/base.yml from variables: [] to a real certificate variable declaration, and updates the "populates the output metadata" integration test to assert the variable is preserved through the bake process. TNZ-112157 Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 5da0da5 commit 0cbe74e

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

internal/carvel/baker_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,9 @@ var _ = Describe("Carvel Baker", func() {
170170
Expect(outMeta.Serial).To(BeFalse())
171171
Expect(outMeta.PropertyBlueprints).To(HaveLen(2))
172172
Expect(outMeta.FormTypes).To(HaveLen(1))
173-
Expect(outMeta.Variables).To(BeEmpty())
173+
Expect(outMeta.Variables).To(HaveLen(1))
174+
Expect(outMeta.Variables[0].Name).To(Equal("sample-tile-ca"))
175+
Expect(outMeta.Variables[0].Type).To(Equal("certificate"))
174176
Expect(outMeta.Releases).To(HaveLen(1))
175177
Expect(outMeta.Releases[0]).To(ContainSubstring("k8s-tile-test"))
176178
Expect(outMeta.InstanceGroups).To(HaveLen(0))

internal/carvel/testdata/sample-tile/base.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@ property_blueprints:
1111
- $( property "admin_password" )
1212
form_types:
1313
- $( form "db_props" )
14-
variables: []
14+
variables:
15+
- name: sample-tile-ca
16+
type: certificate
17+
options:
18+
common_name: Sample Tile CA
19+
is_ca: true
20+
duration: 730
1521
package_installs:
1622
- $( package "test-install" )
1723
compatible_kubernetes_distributions:

0 commit comments

Comments
 (0)