github.com/1aal/kubeblocks@v0.0.0-20231107070852-e1c03e598921/test/e2e/types.go (about) 1 /* 2 Copyright (C) 2022-2023 ApeCloud Co., Ltd 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 package e2e 18 19 import ( 20 "context" 21 22 "github.com/go-logr/logr" 23 "sigs.k8s.io/controller-runtime/pkg/client" 24 ) 25 26 var K8sClient client.Client 27 var Ctx context.Context 28 var Cancel context.CancelFunc 29 var Logger logr.Logger 30 var Version string 31 var Provider string 32 var Region string 33 var SecretID string 34 var SecretKey string 35 var InitEnv bool 36 var TestType string 37 var SkipCase string 38 var ConfigType string 39 var TestResults []Result 40 41 type Result struct { 42 CaseName string 43 ExecuteResult bool 44 TroubleShooting string 45 } 46 47 func NewResult(name string, result bool, troubleShooting string) Result { 48 return Result{ 49 CaseName: name, 50 ExecuteResult: result, 51 TroubleShooting: troubleShooting, 52 } 53 }