github.com/TeaOSLab/EdgeNode@v1.3.8/internal/nodes/node_test.go (about)

     1  package nodes
     2  
     3  import (
     4  	"github.com/TeaOSLab/EdgeNode/internal/utils/testutils"
     5  	_ "github.com/iwind/TeaGo/bootstrap"
     6  	"testing"
     7  )
     8  
     9  func TestNode_Start(t *testing.T) {
    10  	if !testutils.IsSingleTesting() {
    11  		return
    12  	}
    13  
    14  	var node = NewNode()
    15  	node.Start()
    16  }
    17  
    18  func TestNode_Test(t *testing.T) {
    19  	if !testutils.IsSingleTesting() {
    20  		return
    21  	}
    22  
    23  	var node = NewNode()
    24  	err := node.Test()
    25  	if err != nil {
    26  		t.Fatal(err)
    27  	}
    28  	t.Log("ok")
    29  }