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.
25 lines
535 B
25 lines
535 B
package client |
|
|
|
import ( |
|
"context" |
|
"testing" |
|
"time" |
|
|
|
"go-common/app/service/main/identify-game/model" |
|
) |
|
|
|
func TestNew(t *testing.T) { |
|
cli := New(nil) |
|
time.Sleep(2 * time.Second) |
|
if err := cli.DelCache(context.Background(), &model.CleanCacheArgs{Token: "1234567890123456789012"}); err != nil { |
|
t.FailNow() |
|
} |
|
|
|
testDelCache(t, cli) |
|
} |
|
|
|
func testDelCache(t *testing.T, cli *Client) { |
|
if err := cli.DelCache(context.Background(), &model.CleanCacheArgs{Token: "1234567890123456789012"}); err != nil { |
|
t.Errorf("%v\n", err) |
|
} |
|
}
|
|
|