You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
736 B
35 lines
736 B
package secure |
|
|
|
import ( |
|
"context" |
|
"testing" |
|
"time" |
|
|
|
model "go-common/app/service/main/secure/model" |
|
) |
|
|
|
var s *Service |
|
|
|
func TestSecure(t *testing.T) { |
|
s = New(nil) |
|
time.Sleep(1000 * time.Second) |
|
testStatus(t) |
|
testExpectionLoc(t) |
|
} |
|
|
|
// TestStatus test status rpc. |
|
func testStatus(t *testing.T) { |
|
if res, err := s.Status(context.TODO(), &model.ArgSecure{Mid: 1, UUID: "2"}); err != nil { |
|
t.Errorf("Service: Status err: %v", err) |
|
} else { |
|
t.Logf("Service: Status res: %+v", res) |
|
} |
|
} |
|
|
|
func testExpectionLoc(t *testing.T) { |
|
if res, err := s.ExpectionLoc(context.TODO(), &model.ArgSecure{Mid: 1, UUID: "2"}); err != nil { |
|
t.Errorf("Service : Expection err:%v", err) |
|
} else { |
|
t.Logf("Service: Status res: %+v", res) |
|
} |
|
}
|
|
|