mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
fix test
This commit is contained in:
@@ -154,13 +154,9 @@ func TestAppUpdate(t *testing.T) {
|
||||
}{
|
||||
// errors
|
||||
{"/v1/apps/myapp", ``, http.StatusBadRequest, models.ErrInvalidJSON},
|
||||
{"/v1/apps/myapp", `{ "name": "" }`, http.StatusInternalServerError, models.ErrAppsValidationMissingName},
|
||||
{"/v1/apps/myapp", `{ "name": "1234567890123456789012345678901" }`, http.StatusInternalServerError, models.ErrAppsValidationTooLongName},
|
||||
{"/v1/apps/myapp", `{ "name": "&&%@!#$#@$" }`, http.StatusInternalServerError, models.ErrAppsValidationInvalidName},
|
||||
{"/v1/apps/myapp", `{ "name": "&&%@!#$#@$" }`, http.StatusInternalServerError, models.ErrAppsValidationInvalidName},
|
||||
|
||||
// success
|
||||
{"/v1/apps/myapp", `{ "name": "teste" }`, http.StatusOK, nil},
|
||||
{"/v1/apps/myapp", `{ "app": { "config": { "test": "1" } } }`, http.StatusOK, nil},
|
||||
} {
|
||||
body := bytes.NewBuffer([]byte(test.body))
|
||||
_, rec := routerRequest(t, router, "PUT", test.path, body)
|
||||
|
||||
@@ -135,7 +135,6 @@ func handleRunner(c *gin.Context) {
|
||||
for _, param := range params {
|
||||
envVars["PARAM_"+strings.ToUpper(param.Key)] = param.Value
|
||||
}
|
||||
fmt.Println(envVars)
|
||||
|
||||
cfg := &runner.Config{
|
||||
Image: el.Image,
|
||||
|
||||
Reference in New Issue
Block a user