3
vendor/helm.sh/helm/v3/pkg/release/mock.go
vendored
3
vendor/helm.sh/helm/v3/pkg/release/mock.go
vendored
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
package release
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math/rand"
|
||||
|
||||
"helm.sh/helm/v3/pkg/chart"
|
||||
@@ -53,7 +54,7 @@ func Mock(opts *MockReleaseOptions) *Release {
|
||||
|
||||
name := opts.Name
|
||||
if name == "" {
|
||||
name = "testrelease-" + string(rand.Intn(100))
|
||||
name = "testrelease-" + fmt.Sprint(rand.Intn(100))
|
||||
}
|
||||
|
||||
version := 1
|
||||
|
||||
@@ -37,6 +37,9 @@ type Release struct {
|
||||
Version int `json:"version,omitempty"`
|
||||
// Namespace is the kubernetes namespace of the release.
|
||||
Namespace string `json:"namespace,omitempty"`
|
||||
// Labels of the release.
|
||||
// Disabled encoding into Json cause labels are stored in storage driver metadata field.
|
||||
Labels map[string]string `json:"-"`
|
||||
}
|
||||
|
||||
// SetStatus is a helper for setting the status on a release.
|
||||
|
||||
5
vendor/helm.sh/helm/v3/pkg/release/status.go
vendored
5
vendor/helm.sh/helm/v3/pkg/release/status.go
vendored
@@ -42,3 +42,8 @@ const (
|
||||
)
|
||||
|
||||
func (x Status) String() string { return string(x) }
|
||||
|
||||
// IsPending determines if this status is a state or a transition.
|
||||
func (x Status) IsPending() bool {
|
||||
return x == StatusPendingInstall || x == StatusPendingUpgrade || x == StatusPendingRollback
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user