Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita361673

Browse files
authored
fix: Include 'CODER' env var prefix on group mappings (#7015)
* fix: Include 'CODER' env var prefix on group mappings* Unit test to force CODER prefix
1 parent00d468b commita361673

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

‎codersdk/deployment_test.go‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package codersdk_test
22

33
import (
4+
"strings"
45
"testing"
56

67
"github.com/stretchr/testify/require"
@@ -101,6 +102,12 @@ func TestDeploymentValues_HighlyConfigurable(t *testing.T) {
101102
t.Errorf("Option %q is excluded but has an env name",opt.Name)
102103
}
103104

105+
// Also check all env vars are prefixed with CODER_
106+
constprefix="CODER_"
107+
ifopt.Env!=""&&!strings.HasPrefix(opt.Env,prefix) {
108+
t.Errorf("Option %q has an env name (%q) that is not prefixed with %s",opt.Name,opt.Env,prefix)
109+
}
110+
104111
delete(excludes,opt.Name)
105112
}
106113

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp