Files
kubesphere/pkg/simple/client/openpitrix/helmwrapper/helm_wrapper_test.go
LiHui dd8429c542 Fix: nil s3Client of attachment api
Signed-off-by: LiHui <andrewli@yunify.com>

format code

Signed-off-by: LiHui <andrewli@yunify.com>

Fix: delete helmRelease on host when delete member cluster

Signed-off-by: LiHui <andrewli@yunify.com>

Fix: modify repo credential

Signed-off-by: LiHui <andrewli@yunify.com>

remove not exitsts charts from helm repo

Signed-off-by: LiHui <andrewli@yunify.com>
2021-03-18 15:26:23 +08:00

48 lines
1.1 KiB
Go

/*
Copyright 2020 The KubeSphere 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 helmwrapper
import (
"fmt"
"kubesphere.io/kubesphere/pkg/constants"
"os"
"testing"
)
func TestHelmInstall(t *testing.T) {
wr := NewHelmWrapper("", "dummy", "dummy",
SetAnnotations(map[string]string{constants.CreatorAnnotationKey: "1234"}),
SetMock(true))
res, err := wr.install("dummy-chart", "", "dummy-value", false)
if err != nil {
t.Fail()
}
_ = res
}
func TestHelperProcess(t *testing.T) {
if os.Getenv("GO_WANT_HELPER_PROCESS") != "1" {
return
}
// some code here to check arguments perhaps?
fmt.Fprintf(os.Stdout, "helm mock success")
os.Exit(0)
}