MCPcopy Create free account
hub / github.com/Azure/draft / TestInvalidDeployments

Function TestInvalidDeployments

pkg/safeguards/preprocessing/preprocessing_test.go:139–150  ·  view source on GitHub ↗

Testing with malformed Deployment.yaml

(t *testing.T)

Source from the content-addressed store, hash-verified

137
138// Testing with malformed Deployment.yaml
139func TestInvalidDeployments(t *testing.T) {
140 var opt chartutil.ReleaseOptions
141
142 _, err := RenderHelmChart(false, consts.InvalidDeploymentSyntax, opt)
143 assert.NotNil(t, err)
144 assert.Contains(t, err.Error(), "parse error")
145 assert.Contains(t, err.Error(), "function \"selector\" not defined")
146
147 _, err = RenderHelmChart(false, consts.InvalidDeploymentValues, opt)
148 assert.NotNil(t, err)
149 assert.Contains(t, err.Error(), "map has no entry for key")
150}
151
152// Test different helm folder structures
153func TestDifferentFolderStructures(t *testing.T) {

Callers

nothing calls this directly

Calls 2

RenderHelmChartFunction · 0.85
ContainsMethod · 0.80

Tested by

no test coverage detected