As we reevaluate how to best support and maintain Staging Ref in the future, we encourage development teams using this environment to highlight their use cases in the following issue: https://gitlab.com/gitlab-com/gl-infra/software-delivery/framework/software-delivery-framework-issue-tracker/-/issues/36.

Skip to content
Snippets Groups Projects
Unverified Commit d5547156 authored by Ash McKenzie's avatar Ash McKenzie
Browse files

Remove support for Custom data.info_message

parent 8744864a
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -7,9 +7,7 @@ import (
"io"
"io/ioutil"
"net/http"
"strings"
"gitlab.com/gitlab-org/gitlab-shell/internal/console"
"gitlab.com/gitlab-org/gitlab-shell/internal/gitlabnet"
"gitlab.com/gitlab-org/gitlab-shell/internal/gitlabnet/accessverifier"
)
Loading
Loading
@@ -33,8 +31,6 @@ func (c *Command) processCustomAction(response *accessverifier.Response) error {
return errors.New("Custom action error: Empty API endpoints")
}
console.DisplayInfoMessages(strings.Split(data.InfoMessage, "\n"), c.ReadWriter.ErrOut)
return c.processApiEndpoints(response)
}
Loading
Loading
Loading
Loading
@@ -41,7 +41,6 @@ func TestCustomReceivePack(t *testing.T) {
"api_endpoints": []string{"/geo/proxy_git_push_ssh/info_refs", "/geo/proxy_git_push_ssh/push"},
"gl_username": "custom",
"primary_repo": "https://repo/path",
"info_message": "info_message\none more message",
},
},
}
Loading
Loading
@@ -100,6 +99,5 @@ func TestCustomReceivePack(t *testing.T) {
// expect printing of info message, "custom" string from the first request
// and "output" string from the second request
require.Equal(t, "remote: \nremote: info_message\nremote: one more message\nremote: \n", errBuf.String())
require.Equal(t, "customoutput", outBuf.String())
}
Loading
Loading
@@ -41,7 +41,6 @@ type CustomPayloadData struct {
ApiEndpoints []string `json:"api_endpoints"`
Username string `json:"gl_username"`
PrimaryRepo string `json:"primary_repo"`
InfoMessage string `json:"info_message"`
UserId string `json:"gl_id,omitempty"`
}
Loading
Loading
Loading
Loading
@@ -97,7 +97,6 @@ func TestGetCustomAction(t *testing.T) {
ApiEndpoints: []string{"geo/proxy_git_push_ssh/info_refs", "geo/proxy_git_push_ssh/push"},
Username: "custom",
PrimaryRepo: "https://repo/path",
InfoMessage: "message",
},
}
response.StatusCode = 300
Loading
Loading
Loading
Loading
@@ -22,8 +22,7 @@
"data": {
"api_endpoints": ["geo/proxy_git_push_ssh/info_refs", "geo/proxy_git_push_ssh/push"],
"gl_username": "custom",
"primary_repo": "https://repo/path",
"info_message": "message"
"primary_repo": "https://repo/path"
}
},
"git_protocol": "protocol",
Loading
Loading
Loading
Loading
@@ -52,8 +52,7 @@ describe 'Custom bin/gitlab-shell git-receive-pack' do
"data" => {
"api_endpoints" => ["/geo/proxy_git_push_ssh/info_refs", "/geo/proxy_git_push_ssh/push"],
"gl_username" => "custom",
"primary_repo" => "https://repo/path",
"info_message" => "info_message\nanother_message",
"primary_repo" => "https://repo/path"
},
},
"gl_console_messages" => ["console", "message"]
Loading
Loading
@@ -75,11 +74,6 @@ describe 'Custom bin/gitlab-shell git-receive-pack' do
expect(stderr.gets).to eq("remote: message\n")
expect(stderr.gets).to eq(remote_blank_line)
expect(stderr.gets).to eq(remote_blank_line)
expect(stderr.gets).to eq("remote: info_message\n")
expect(stderr.gets).to eq("remote: another_message\n")
expect(stderr.gets).to eq(remote_blank_line)
stdin.puts("input")
stdin.close
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment