diff options
author | Valery Piashchynski <[email protected]> | 2020-12-01 16:20:07 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-12-01 16:20:07 +0300 |
commit | f320b5803ef8fda3d0371a2a6de26ee9f66d2d22 (patch) | |
tree | 73fee30607901e50235c634697d1e44f905bb317 /plugins/static | |
parent | 7e7e75e9dbb7d3448c38b63a98ed0e409d47ae5a (diff) |
GHA update
Diffstat (limited to 'plugins/static')
-rw-r--r-- | plugins/static/tests/static_plugin_test.go | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/plugins/static/tests/static_plugin_test.go b/plugins/static/tests/static_plugin_test.go index a9cb1fd1..d0403160 100644 --- a/plugins/static/tests/static_plugin_test.go +++ b/plugins/static/tests/static_plugin_test.go @@ -57,8 +57,9 @@ func TestStaticPlugin(t *testing.T) { wg := &sync.WaitGroup{} wg.Add(1) + tt := time.NewTimer(time.Second * 10) + go func() { - tt := time.NewTimer(time.Second * 10) defer wg.Done() for { select { @@ -85,6 +86,7 @@ func TestStaticPlugin(t *testing.T) { } }() + time.Sleep(time.Second) t.Run("ServeSample", serveStaticSample) t.Run("StaticNotForbid", staticNotForbid) t.Run("StaticHeaders", staticHeaders) @@ -163,8 +165,9 @@ func TestStaticDisabled(t *testing.T) { wg := &sync.WaitGroup{} wg.Add(1) + tt := time.NewTimer(time.Second * 10) + go func() { - tt := time.NewTimer(time.Second * 10) defer wg.Done() for { select { @@ -191,6 +194,7 @@ func TestStaticDisabled(t *testing.T) { } }() + time.Sleep(time.Second) t.Run("StaticDisabled", staticDisabled) wg.Wait() } @@ -234,8 +238,9 @@ func TestStaticFilesDisabled(t *testing.T) { wg := &sync.WaitGroup{} wg.Add(1) + tt := time.NewTimer(time.Second * 10) + go func() { - tt := time.NewTimer(time.Second * 10) defer wg.Done() for { select { @@ -262,6 +267,7 @@ func TestStaticFilesDisabled(t *testing.T) { } }() + time.Sleep(time.Second) t.Run("StaticFilesDisabled", staticFilesDisabled) wg.Wait() } @@ -314,8 +320,9 @@ func TestStaticFilesForbid(t *testing.T) { wg := &sync.WaitGroup{} wg.Add(1) + tt := time.NewTimer(time.Second * 10) + go func() { - tt := time.NewTimer(time.Second * 10) defer wg.Done() for { select { @@ -342,6 +349,7 @@ func TestStaticFilesForbid(t *testing.T) { } }() + time.Sleep(time.Second) t.Run("StaticTestFilesDir", staticTestFilesDir) t.Run("StaticNotFound", staticNotFound) t.Run("StaticFilesForbid", staticFilesForbid) |