Skip to content

Commit

Permalink
temp commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhargav-InfraCloud committed Mar 10, 2024
1 parent 9481f56 commit 33ce9fe
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 5 deletions.
33 changes: 33 additions & 0 deletions cmd/helm/get_deployed_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
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 TestGetDeployed(t *testing.T) {
tests := []cmdTestCase{
// {
// name: "get deployed with a release",
// cmd: "get deployed luffy",
// golden: "output/get-release.txt",
// rels: []*release.Release{release.Mock(&release.MockReleaseOptions{Name: "luffy"})},
// },
}
runTestCmd(t, tests)
}
9 changes: 5 additions & 4 deletions cmd/helm/helm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,11 @@ func executeActionCommandStdinC(store *storage.Storage, in *os.File, cmd string)
buf := new(bytes.Buffer)

actionConfig := &action.Configuration{
Releases: store,
KubeClient: &kubefake.PrintingKubeClient{Out: io.Discard},
Capabilities: chartutil.DefaultCapabilities,
Log: func(format string, v ...interface{}) {},
Releases: store,
KubeClient: &kubefake.PrintingKubeClient{Out: io.Discard},
Capabilities: chartutil.DefaultCapabilities,
Log: func(format string, v ...interface{}) {},
RESTClientGetter: settings.RESTClientGetter(),
}

root, err := newRootCmd(actionConfig, buf, args)
Expand Down
2 changes: 1 addition & 1 deletion cmd/helm/testdata/output/get-release.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
NAME: thomas-guide
NAME: luffy
LAST DEPLOYED: Fri Sep 2 22:04:05 1977
NAMESPACE: default
STATUS: deployed
Expand Down

0 comments on commit 33ce9fe

Please sign in to comment.