Merge pull request '[agent/codex:gpt-5.3-codex-spark] Read docs/RFC.md fully. Find ONE feature described in the sp...' (#94) from main into dev
This commit is contained in:
commit
346df8fc9d
2 changed files with 15 additions and 1 deletions
|
|
@ -188,7 +188,7 @@ func NewService(options ServiceOptions) *Service {
|
|||
}
|
||||
|
||||
hsdClient := options.HSDClient
|
||||
if hsdClient == nil && strings.TrimSpace(options.HSDURL) != "" {
|
||||
if hsdClient == nil {
|
||||
hsdPassword := options.HSDPassword
|
||||
if hsdPassword == "" {
|
||||
hsdPassword = options.HSDApiKey
|
||||
|
|
|
|||
|
|
@ -1675,6 +1675,20 @@ func TestServiceDiscoverAliasesReturnsNilWithoutDiscovererOrHSDClient(t *testing
|
|||
}
|
||||
}
|
||||
|
||||
func TestServiceCreatesDefaultHSDClientWhenURLNotConfigured(t *testing.T) {
|
||||
service := NewService(ServiceOptions{
|
||||
ChainAliasDiscoverer: func(_ context.Context) ([]string, error) {
|
||||
return []string{"gateway.charon.lthn"}, nil
|
||||
},
|
||||
})
|
||||
if service.hsdClient == nil {
|
||||
t.Fatalf("expected default HSD client to be created when HSDURL is not configured")
|
||||
}
|
||||
if service.hsdClient.baseURL != "http://127.0.0.1:14037" {
|
||||
t.Fatalf("expected default HSD base URL, got %q", service.hsdClient.baseURL)
|
||||
}
|
||||
}
|
||||
|
||||
func TestServiceServeResolvesAAndAAAARecords(t *testing.T) {
|
||||
service := NewService(ServiceOptions{
|
||||
Records: map[string]NameRecords{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue