Documentation ¶
Overview ¶
Copyright 2019 The KubeEdge 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.
Copyright 2019 The KubeEdge 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.
Copyright 2019 The KubeEdge 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.
Index ¶
- func CheckNodeDeleteStatus(ctx *TestContext, nodehandler, nodename string) int
- func CheckNodeReadyStatus(ctx *TestContext, nodehandler, nodename string) string
- func CheckPodDeleteState(apiserver string, podlist v1.PodList)
- func CheckPodRunningState(apiserver string, podlist v1.PodList)
- func DeRegisterNodeFromMaster(ctx *TestContext, nodehandler, nodename string) error
- func Debug(format string, data []byte, err error)
- func DeleteDeployment(DeploymentApi, deploymentname string) int
- func DeletePods(apiserver string) (string, int)
- func Failf(format string, args ...interface{})
- func GenerateNodeReqBody(nodeid, nodeselector string) (error, map[string]interface{})
- func GetDeployments(list *apps.DeploymentList, getDeploymentApi string) error
- func GetPodState(apiserver string) (string, int)
- func GetPods(apiserver, label string) (v1.PodList, error)
- func GetRandomString(length int) string
- func HandleDeployment(operation, apiserver, UID, ImageUrl, nodeselector string, replica int) bool
- func HandlePod(operation string, apiserver string, UID string, ImageUrl, nodeselector string) bool
- func Info(format string, args ...interface{})
- func InfoV2(format string, args ...interface{})
- func InfoV6(format string, args ...interface{})
- func Logf(format string, args ...interface{})
- func MapLabels(ls map[string]string) string
- func PrintCombinedOutput(cmd *exec.Cmd) error
- func PrintTestcaseNameandStatus()
- func RandomInt(min, max int) int
- func RegisterNodeToMaster(ctx *TestContext, UID, nodehandler, nodeselector string) error
- func SendHttpRequest(method, reqApi string) (error, *http.Response)
- type Config
- type TestContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckNodeDeleteStatus ¶
func CheckNodeDeleteStatus(ctx *TestContext, nodehandler, nodename string) int
CheckNodeDeleteStatus to check node delete status
func CheckNodeReadyStatus ¶
func CheckNodeReadyStatus(ctx *TestContext, nodehandler, nodename string) string
CheckNodeReadyStatus to get node status
func CheckPodDeleteState ¶
CheckPodDeleteState function to check the Pod state
func CheckPodRunningState ¶
CheckPodRunningState function to check the Pod state
func DeRegisterNodeFromMaster ¶
func DeRegisterNodeFromMaster(ctx *TestContext, nodehandler, nodename string) error
DeRegisterNodeFromMaster to deregister the node from master
func DeleteDeployment ¶
DeleteDeployment to delete deployment
func DeletePods ¶
DeletePods function to get the pod status and response code
func GenerateNodeReqBody ¶
GenerateNodeReqBody to generate the node request body
func GetDeployments ¶
func GetDeployments(list *apps.DeploymentList, getDeploymentApi string) error
GetDeployments to get the deployments list
func GetPodState ¶
GetPodState function to get the pod status and response code
func HandleDeployment ¶
HandleDeployment to handle app deployment/delete deployment.
func PrintCombinedOutput ¶
PrintCombinedOutput to show the os command injuction in combined format
func PrintTestcaseNameandStatus ¶
func PrintTestcaseNameandStatus()
Function to print the test case name and status of execution
func RegisterNodeToMaster ¶
func RegisterNodeToMaster(ctx *TestContext, UID, nodehandler, nodeselector string) error
RegisterNodeToMaster to register node to master
Types ¶
type Config ¶
type Config struct { EdgedEndpoint string `json:"edgedEndpoint"` AppImageUrl []string `json:"image_url"` ApiServer string `json:"apiserver"` }
config.json decode struct
type TestContext ¶
type TestContext struct {
Cfg Config
}
Test context struct
func NewTestContext ¶
func NewTestContext(cfg Config) *TestContext
NewTestContext function to build testcontext with provided config.