mirror of https://github.com/helm/helm
conflicts resolved Signed-off-by: Yonatan Kahana <yonatankahana.il@gmail.com>pull/8077/head
commit
88086332a6
@ -0,0 +1,15 @@
|
||||
name: "Close stale issues"
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v3
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-issue-message: 'This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.'
|
||||
exempt-issue-labels: 'keep+open,v4.x'
|
||||
days-before-stale: 90
|
||||
days-before-close: 30
|
@ -0,0 +1,58 @@
|
||||
/*
|
||||
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"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"helm.sh/helm/v3/pkg/chart"
|
||||
"helm.sh/helm/v3/pkg/release"
|
||||
)
|
||||
|
||||
// Check if file completion should be performed according to parameter 'shouldBePerformed'
|
||||
func checkFileCompletion(t *testing.T, cmdName string, shouldBePerformed bool) {
|
||||
storage := storageFixture()
|
||||
storage.Create(&release.Release{
|
||||
Name: "myrelease",
|
||||
Info: &release.Info{Status: release.StatusDeployed},
|
||||
Chart: &chart.Chart{},
|
||||
Version: 1,
|
||||
})
|
||||
|
||||
testcmd := fmt.Sprintf("__complete %s ''", cmdName)
|
||||
_, out, err := executeActionCommandC(storage, testcmd)
|
||||
if err != nil {
|
||||
t.Errorf("unexpected error, %s", err)
|
||||
}
|
||||
if !strings.Contains(out, "ShellCompDirectiveNoFileComp") != shouldBePerformed {
|
||||
if shouldBePerformed {
|
||||
t.Error(fmt.Sprintf("Unexpected directive ShellCompDirectiveNoFileComp when completing '%s'", cmdName))
|
||||
} else {
|
||||
|
||||
t.Error(fmt.Sprintf("Did not receive directive ShellCompDirectiveNoFileComp when completing '%s'", cmdName))
|
||||
}
|
||||
t.Log(out)
|
||||
}
|
||||
}
|
||||
|
||||
func TestCompletionFileCompletion(t *testing.T) {
|
||||
checkFileCompletion(t, "completion", false)
|
||||
checkFileCompletion(t, "completion bash", false)
|
||||
checkFileCompletion(t, "completion zsh", false)
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
/*
|
||||
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 (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestDependencyFileCompletion(t *testing.T) {
|
||||
checkFileCompletion(t, "dependency", false)
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
/*
|
||||
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 (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestDocsFileCompletion(t *testing.T) {
|
||||
checkFileCompletion(t, "docs", false)
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
/*
|
||||
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 (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestEnv(t *testing.T) {
|
||||
tests := []cmdTestCase{{
|
||||
name: "completion for env",
|
||||
cmd: "__complete env ''",
|
||||
golden: "output/env-comp.txt",
|
||||
}}
|
||||
runTestCmd(t, tests)
|
||||
}
|
||||
|
||||
func TestEnvFileCompletion(t *testing.T) {
|
||||
checkFileCompletion(t, "env", false)
|
||||
checkFileCompletion(t, "env HELM_BIN", false)
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
/*
|
||||
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 (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestGetFileCompletion(t *testing.T) {
|
||||
checkFileCompletion(t, "get", false)
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
/*
|
||||
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 (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestReleaseTestingFileCompletion(t *testing.T) {
|
||||
checkFileCompletion(t, "test", false)
|
||||
checkFileCompletion(t, "test myrelease", false)
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
/*
|
||||
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 (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestRepoFileCompletion(t *testing.T) {
|
||||
checkFileCompletion(t, "repo", false)
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
/*
|
||||
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 "testing"
|
||||
|
||||
func TestSearchFileCompletion(t *testing.T) {
|
||||
checkFileCompletion(t, "search", false)
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
apiVersion: v1
|
||||
entries: {}
|
||||
generated: "2020-06-23T10:01:59.2530763-07:00"
|
@ -0,0 +1,16 @@
|
||||
HELM_BIN
|
||||
HELM_CACHE_HOME
|
||||
HELM_CONFIG_HOME
|
||||
HELM_DATA_HOME
|
||||
HELM_DEBUG
|
||||
HELM_KUBEAPISERVER
|
||||
HELM_KUBECONTEXT
|
||||
HELM_KUBETOKEN
|
||||
HELM_MAX_HISTORY
|
||||
HELM_NAMESPACE
|
||||
HELM_PLUGINS
|
||||
HELM_REGISTRY_CONFIG
|
||||
HELM_REPOSITORY_CACHE
|
||||
HELM_REPOSITORY_CONFIG
|
||||
:4
|
||||
Completion ended with directive: ShellCompDirectiveNoFileComp
|
@ -1,5 +1,7 @@
|
||||
==> Linting testdata/testcharts/chart-with-bad-subcharts
|
||||
[INFO] Chart.yaml: icon is recommended
|
||||
[WARNING] templates/: directory not found
|
||||
[ERROR] : unable to load chart
|
||||
error unpacking bad-subchart in chart-with-bad-subcharts: validation: chart.metadata.name is required
|
||||
|
||||
1 chart(s) linted, 0 chart(s) failed
|
||||
Error: 1 chart(s) linted, 1 chart(s) failed
|
||||
|
@ -1 +1,2 @@
|
||||
:4
|
||||
Completion ended with directive: ShellCompDirectiveNoFileComp
|
||||
|
@ -0,0 +1,4 @@
|
||||
carabins
|
||||
musketeers
|
||||
:4
|
||||
Completion ended with directive: ShellCompDirectiveNoFileComp
|
@ -0,0 +1,2 @@
|
||||
:4
|
||||
Completion ended with directive: ShellCompDirectiveNoFileComp
|
@ -1,4 +1,4 @@
|
||||
Error: values don't meet the specifications of the schema(s) in the following chart(s):
|
||||
empty:
|
||||
- age: Must be greater than or equal to 0/1
|
||||
- age: Must be greater than or equal to 0
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
Error: values don't meet the specifications of the schema(s) in the following chart(s):
|
||||
empty:
|
||||
- (root): employmentInfo is required
|
||||
- age: Must be greater than or equal to 0/1
|
||||
- age: Must be greater than or equal to 0
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
aramis
|
||||
athos
|
||||
:4
|
||||
Completion ended with directive: ShellCompDirectiveNoFileComp
|
||||
|
@ -1 +1,2 @@
|
||||
:4
|
||||
Completion ended with directive: ShellCompDirectiveNoFileComp
|
||||
|
@ -1,4 +1,4 @@
|
||||
Error: values don't meet the specifications of the schema(s) in the following chart(s):
|
||||
subchart-with-schema:
|
||||
- age: Must be greater than or equal to 0/1
|
||||
- age: Must be greater than or equal to 0
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
Error: UPGRADE FAILED: another operation (install/upgrade/rollback) is in progress
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue