github.com/moqsien/xraycore@v1.8.5/app/reverse/portal_test.go (about)

     1  package reverse_test
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/moqsien/xraycore/app/reverse"
     7  	"github.com/moqsien/xraycore/common"
     8  )
     9  
    10  func TestStaticPickerEmpty(t *testing.T) {
    11  	picker, err := reverse.NewStaticMuxPicker()
    12  	common.Must(err)
    13  	worker, err := picker.PickAvailable()
    14  	if err == nil {
    15  		t.Error("expected error, but nil")
    16  	}
    17  	if worker != nil {
    18  		t.Error("expected nil worker, but not nil")
    19  	}
    20  }