10000 feat: Enable custom support links by mtojek · Pull Request #6313 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

feat: Enable custom support links #6313

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Feb 27, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test: CODER_SUPPORT_LINKS_0_NAME
  • Loading branch information
mtojek committed Feb 22, 2023
commit 830b6b19e10507123364a760f0cc394edfe58bfa
23 changes: 23 additions & 0 deletions cli/deployment/config_t A937 est.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,29 @@ func TestConfig(t *testing.T) {
Regex: "gitlab.com",
}}, config.GitAuth.Value)
},
}, {
Name: "Support links",
Env: map[string]string{
"CODER_SUPPORT_LINKS_0_NAME": "First link",
"CODER_SUPPORT_LINKS_0_TARGET": "http://target-link-1",
"CODER_SUPPORT_LINKS_0_ICON": "bug",

"CODER_SUPPORT_LINKS_1_NAME": "Second link",
"CODER_SUPPORT_LINKS_1_TARGET": "http://target-link-2",
"CODER_SUPPORT_LINKS_1_ICON": "chat",
},
Valid: func(config *codersdk.DeploymentConfig) {
require.Len(t, config.Support.Links.Value, 2)
require.Equal(t, []codersdk.LinkConfig{{
Name: "First link",
Target: "http://target-link-1",
Icon: "bug",
}, {
Name: "Second link",
Target: "http://target-link-2",
Icon: "chat",
}}, config.Support.Links.Value)
},
}, {
Name: "Wrong env must not break default values",
Env: map[string]string{
Expand Down
0