[#215] added server-side handlers for serving private files
This commit is contained in:
@@ -159,6 +159,7 @@ func (scenario *ApiScenario) Test(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// @todo consider adding the response body to the AfterTestFunc args
|
||||
if scenario.AfterTestFunc != nil {
|
||||
scenario.AfterTestFunc(t, testApp, e)
|
||||
}
|
||||
|
||||
@@ -446,6 +446,14 @@ func NewTestApp(optTestDataDir ...string) (*TestApp, error) {
|
||||
return t.registerEventCall("OnFileDownloadRequest")
|
||||
})
|
||||
|
||||
t.OnFileBeforeTokenRequest().Add(func(e *core.FileTokenEvent) error {
|
||||
return t.registerEventCall("OnFileBeforeTokenRequest")
|
||||
})
|
||||
|
||||
t.OnFileAfterTokenRequest().Add(func(e *core.FileTokenEvent) error {
|
||||
return t.registerEventCall("OnFileAfterTokenRequest")
|
||||
})
|
||||
|
||||
return t, nil
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user