mirror of https://github.com/helm/helm
Previously, the lint command ignored values passed via value options flags when linting a chart's values.yaml file. This was problematic because such values are often required when validating against JSON schema Closes #7273 Signed-off-by: Robbie deMuth <robbie.demuth@appian.com>pull/7417/head
parent
c08daeca5f
commit
779f42f558
@ -0,0 +1,38 @@
|
||||
/*
|
||||
Copyright The Helm Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestLintCmd(t *testing.T) {
|
||||
chart := "testdata/testcharts/chart-with-schema-negative"
|
||||
tests := []cmdTestCase{
|
||||
{
|
||||
name: "check fails without value option flags",
|
||||
cmd: fmt.Sprintf("lint %s", chart),
|
||||
wantError: true,
|
||||
},
|
||||
{
|
||||
name: "check passes with value option flags",
|
||||
cmd: fmt.Sprintf("lint %s --set age=25,employmentInfo.salary=100000", chart),
|
||||
},
|
||||
}
|
||||
runTestCmd(t, tests)
|
||||
}
|
Loading…
Reference in new issue