refactor(api): improved tests and test messages

Co-authored-by: Julien Neuhart <neuhart.julien@gmail.com>
This commit is contained in:
Jonas Geiler
2024-05-27 11:27:40 +02:00
committed by Julien Neuhart
parent c1cf1eb37a
commit 73d02e85c4

View File

@@ -489,7 +489,7 @@ func TestApi_Validate(t *testing.T) {
expectError: true,
},
{
scenario: "invalid tls files: only cert file provided",
scenario: "invalid TLS files: only cert file provided",
port: 10,
tlsCertFile: "cert.pem",
rootPath: "/foo/",
@@ -499,7 +499,7 @@ func TestApi_Validate(t *testing.T) {
expectError: true,
},
{
scenario: "invalid tls files: only key file provided",
scenario: "invalid TLS files: only key file provided",
port: 10,
tlsKeyFile: "key.pem",
rootPath: "/foo/",
@@ -670,7 +670,7 @@ func TestApi_Validate(t *testing.T) {
},
},
{
scenario: "success with tls",
scenario: "success with TLS",
port: 10,
tlsCertFile: "cert.pem",
tlsKeyFile: "key.pem",
@@ -689,18 +689,6 @@ func TestApi_Validate(t *testing.T) {
IsMultipart: true,
},
},
middlewares: []Middleware{
{
Priority: HighPriority,
Handler: func() echo.MiddlewareFunc {
return func(next echo.HandlerFunc) echo.HandlerFunc {
return func(c echo.Context) error {
return next(c)
}
}
}(),
},
},
},
} {
t.Run(tc.scenario, func(t *testing.T) {
@@ -751,7 +739,7 @@ func TestApi_Start(t *testing.T) {
expectError: false,
},
{
scenario: "success with tls",
scenario: "success with TLS",
readyFn: []func() error{
func() error { return nil },
func() error { return nil },