fix: /test url and json (#22780)

This commit is contained in:
Saturnino Abril 2023-04-04 06:04:11 +08:00 committed by GitHub
parent f97a11680b
commit 8d301c0d64
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -629,7 +629,7 @@ func (*LoadTestProvider) URLCommand(a *app.App, c request.CTX, args *model.Comma
// provide a shortcut to easily access tests stored in doc/developer/tests
if !strings.HasPrefix(url, "http") {
url = "https://raw.githubusercontent.com/mattermost/mattermost-server/master/tests/" + url
url = "https://raw.githubusercontent.com/mattermost/mattermost-server/master/server/tests/" + url
if path.Ext(url) == "" {
url += ".md"
@ -683,7 +683,7 @@ func (*LoadTestProvider) JsonCommand(a *app.App, c request.CTX, args *model.Comm
// provide a shortcut to easily access tests stored in doc/developer/tests
if !strings.HasPrefix(url, "http") {
url = "https://raw.githubusercontent.com/mattermost/mattermost-server/master/tests/" + url
url = "https://raw.githubusercontent.com/mattermost/mattermost-server/master/server/tests/" + url
if path.Ext(url) == "" {
url += ".json"