From 742e21aeba5c02935269a2a3681f4486019ce542 Mon Sep 17 00:00:00 2001 From: zeripath Date: Sat, 28 Nov 2020 02:42:08 +0000 Subject: Handle and propagate errors when checking if paths are Dirs, Files or Exist (#13186) * Ensure errors from IsDir propagate * Handle errors when checking IsFile * Handle and propagate errors from IsExist * Update modules/templates/static.go * Update modules/templates/static.go * Return after ctx.ServerError * Apply suggestions from code review * Fix tests The previous merge managed to break repo_form.go Signed-off-by: Andrew Thornton Co-authored-by: techknowlogick Co-authored-by: Lauris BH --- integrations/api_repo_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'integrations/api_repo_test.go') diff --git a/integrations/api_repo_test.go b/integrations/api_repo_test.go index da87db7b1b..25662cdda3 100644 --- a/integrations/api_repo_test.go +++ b/integrations/api_repo_test.go @@ -325,7 +325,7 @@ func TestAPIRepoMigrate(t *testing.T) { if resp.Code == http.StatusUnprocessableEntity { respJSON := map[string]string{} DecodeJSON(t, resp, &respJSON) - if assert.Equal(t, respJSON["message"], "Remote visit addressed rate limitation.") { + if assert.Equal(t, "Remote visit addressed rate limitation.", respJSON["message"]) { t.Log("test hit github rate limitation") } } else { -- cgit v1.2.3