Add projects
This commit is contained in:
parent
2d3a9ad623
commit
8b607dd700
1802 changed files with 503346 additions and 2 deletions
34
backend/internal/config/claude_code_test.go
Normal file
34
backend/internal/config/claude_code_test.go
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
package config
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestParseConfigBytesClaudeCodeModelListCloaking(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
yaml string
|
||||
want bool
|
||||
}{
|
||||
{
|
||||
name: "defaults to enabled cloaking",
|
||||
yaml: "port: 8317\n",
|
||||
want: false,
|
||||
},
|
||||
{
|
||||
name: "disables model list cloaking",
|
||||
yaml: "claude-code:\n disable-cloaking-model-list: true\n",
|
||||
want: true,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
cfg, errParse := ParseConfigBytes([]byte(tt.yaml))
|
||||
if errParse != nil {
|
||||
t.Fatalf("ParseConfigBytes() error = %v", errParse)
|
||||
}
|
||||
if got := cfg.ClaudeCode.DisableCloakingModelList; got != tt.want {
|
||||
t.Fatalf("DisableCloakingModelList = %t, want %t", got, tt.want)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue