mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-19 09:06:14 +00:00
Fix migration to use the correct URL format (#165)
Fixes https://github.com/gesellix/Bose-SoundTouch/issues/161
This commit is contained in:
@@ -217,7 +217,7 @@ func (m *Manager) GetMigrationSummary(deviceIP, targetURL, proxyURL string, opti
|
||||
|
||||
// 1. Initial planned config
|
||||
plannedCfg := PrivateCfg{
|
||||
MargeServerUrl: fmt.Sprintf("%s/marge", targetURL),
|
||||
MargeServerUrl: targetURL,
|
||||
StatsServerUrl: targetURL,
|
||||
SwUpdateUrl: fmt.Sprintf("%s/updates/soundtouch", targetURL),
|
||||
UsePandoraProductionServer: true,
|
||||
@@ -708,7 +708,7 @@ func (m *Manager) migrateViaXML(deviceIP, targetURL, proxyURL string, options ma
|
||||
}
|
||||
|
||||
cfg := PrivateCfg{
|
||||
MargeServerUrl: fmt.Sprintf("%s/marge", targetURL),
|
||||
MargeServerUrl: targetURL,
|
||||
StatsServerUrl: targetURL,
|
||||
SwUpdateUrl: fmt.Sprintf("%s/updates/soundtouch", targetURL),
|
||||
UsePandoraProductionServer: true,
|
||||
|
||||
@@ -270,7 +270,7 @@ func TestGetMigrationSummary_WithProxyOptions(t *testing.T) {
|
||||
}
|
||||
|
||||
// When SSH fails (which it will here), PlannedConfig should be the default one for target:8000
|
||||
if !contains(summary.PlannedConfig, "http://target:8000/marge") {
|
||||
if !contains(summary.PlannedConfig, "http://target:8000") {
|
||||
t.Errorf("Expected default marge URL when SSH fails, got: %s", summary.PlannedConfig)
|
||||
}
|
||||
|
||||
@@ -1418,7 +1418,7 @@ func TestCheckIsMigrated(t *testing.T) {
|
||||
summary := &MigrationSummary{
|
||||
SSHSuccess: true,
|
||||
ParsedCurrentConfig: &PrivateCfg{
|
||||
MargeServerUrl: "http://aftertouch:8000/marge",
|
||||
MargeServerUrl: "http://aftertouch:8000",
|
||||
},
|
||||
}
|
||||
m.checkIsMigrated(summary, "127.0.0.1")
|
||||
@@ -1514,7 +1514,7 @@ func TestCheckIsMigrated(t *testing.T) {
|
||||
summary := &MigrationSummary{
|
||||
SSHSuccess: true,
|
||||
ParsedCurrentConfig: &PrivateCfg{
|
||||
MargeServerUrl: "http://streaming.bose.com/marge",
|
||||
MargeServerUrl: "http://streaming.bose.com",
|
||||
},
|
||||
CACertTrusted: false,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user