mirror of
https://github.com/nxtrace/NTrace-core.git
synced 2025-08-12 06:26:39 +00:00
20 lines
388 B
Go
20 lines
388 B
Go
package pow
|
|
|
|
import (
|
|
"fmt"
|
|
"github.com/stretchr/testify/assert"
|
|
"testing"
|
|
"time"
|
|
)
|
|
|
|
func TestGetToken(t *testing.T) {
|
|
// 计时开始
|
|
start := time.Now()
|
|
token, err := GetToken("api.leo.moe", "api.leo.moe", "443")
|
|
// 计时结束
|
|
end := time.Now()
|
|
fmt.Println("耗时:", end.Sub(start))
|
|
fmt.Println("token:", token)
|
|
assert.NoError(t, err, "GetToken() returned an error")
|
|
}
|