github.com/jingruilea/kubeedge@v1.2.0-beta.0.0.20200410162146-4bb8902b3879/edge/test/integration/appdeployment/application_suite_test.go (about)

     1  /*
     2  Copyright 2019 The KubeEdge Authors.
     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 application_test
    18  
    19  import (
    20  	"testing"
    21  
    22  	"github.com/kubeedge/kubeedge/edge/test/integration/utils"
    23  
    24  	. "github.com/onsi/ginkgo"
    25  	. "github.com/onsi/gomega"
    26  
    27  	"github.com/kubeedge/kubeedge/edge/test/integration/utils/common"
    28  	"github.com/kubeedge/kubeedge/edge/test/integration/utils/edge"
    29  )
    30  
    31  //context to load config and access across the package
    32  var (
    33  	ctx *edge.TestContext
    34  	cfg edge.Config
    35  )
    36  
    37  //Function to run the Ginkgo Test
    38  func TestEdgecoreAppDeployment(t *testing.T) {
    39  	RegisterFailHandler(Fail)
    40  	//var UID string
    41  	var _ = BeforeSuite(func() {
    42  		common.Infof("Before Suite Execution")
    43  		cfg = edge.LoadConfig()
    44  		ctx = edge.NewTestContext(cfg)
    45  
    46  		Expect(utils.CreateEdgeCoreConfigFile(cfg.NodeID)).Should(BeNil())
    47  		Expect(utils.StartEdgeCore()).Should(BeNil())
    48  	})
    49  	AfterSuite(func() {
    50  		By("After Suite Execution....!")
    51  	})
    52  
    53  	RunSpecs(t, "kubeedge App Deploymet Suite")
    54  }