minor refactoring of const + better timeout handling in pinter package + api package tests

This commit is contained in:
Julien Neuhart
2019-07-10 11:46:58 +02:00
parent 0c1e4e6888
commit f6b357691c
27 changed files with 604 additions and 213 deletions

View File

@@ -11,7 +11,7 @@ import (
func Cleanup() echo.MiddlewareFunc {
return func(next echo.HandlerFunc) echo.HandlerFunc {
return func(c echo.Context) error {
const op = "middleware.Cleanup"
const op string = "middleware.Cleanup"
err := next(c)
ctx := context.MustCastFromEchoContext(c)
r := ctx.Resource()

View File

@@ -15,13 +15,13 @@ import (
const (
// TestingTraceEnvVar is an environment
// variable used in some tests.
TestingTraceEnvVar = "TESTING_TRACE"
TestingTraceEnvVar string = "TESTING_TRACE"
// TestsTracePrefix helps
// creating all resources inside a prefix.
// Only used in some tests
// to check if the resources
// have been removed.
TestsTracePrefix = "tmp"
TestsTracePrefix string = "tmp"
)
// Context helps extending the default echo.Context with