Feat: GET interface for remote policy

This commit is contained in:
HFO4
2020-01-02 14:51:17 +08:00
parent 0f93864c8e
commit 1393659668
6 changed files with 75 additions and 12 deletions

View File

@@ -58,12 +58,13 @@ func TestHandler_Source(t *testing.T) {
// 无法获取上下文
{
handler := Handler{
Policy: &model.Policy{Server: "/"},
AuthInstance: auth.HMACAuth{},
}
ctx := context.Background()
res, err := handler.Source(ctx, "", url.URL{}, 0, true, 0)
asserts.Error(err)
asserts.Empty(res)
asserts.NoError(err)
asserts.NotEmpty(res)
}
// 成功