fix: correct integration test to use proper function and type names

- Use client.NewClientFromHost instead of non-existent client.New
- Use models.DeviceInfo instead of non-existent models.Info
- Use discovery.UnifiedDiscoveryService instead of non-existent discovery.Scanner
- Use config.DefaultConfig instead of non-existent config.NewConfig
- Add config package import for discovery service creation

This fixes the integration test failure where undefined symbols were being referenced.
This commit is contained in:
Tobias Gesellchen
2026-01-09 13:14:53 +01:00
parent 029a17210c
commit c9ac73e082
+7 -5
View File
@@ -193,20 +193,22 @@ jobs:
"github.com/user_account/bose-soundtouch/pkg/client"
"github.com/user_account/bose-soundtouch/pkg/models"
"github.com/user_account/bose-soundtouch/pkg/discovery"
"github.com/user_account/bose-soundtouch/pkg/config"
)
func main() {
// Test basic client creation
c := client.New("192.168.1.100", 8090)
c := client.NewClientFromHost("192.168.1.100")
fmt.Printf("Client created for %s\n", c.BaseURL())
// Test models can be imported
var info models.Info
fmt.Printf("Info model available: %T\n", info)
var info models.DeviceInfo
fmt.Printf("DeviceInfo model available: %T\n", info)
// Test discovery can be imported
var scanner discovery.Scanner
fmt.Printf("Scanner available: %T\n", scanner)
cfg := config.DefaultConfig()
service := discovery.NewUnifiedDiscoveryService(cfg)
fmt.Printf("Discovery service available: %T\n", service)
fmt.Println("All imports successful!")
}