CloudMigrations: Fix traceability & HTTP Client initialisation (#94141)

* Add traceability to Migration Assistant feature

* Fix some compilation errors

* Fix lint issues

* Use async context

* Add trace for LibraryElements
This commit is contained in:
Roberto Jiménez Sánchez
2024-10-07 11:31:45 +02:00
committed by GitHub
parent 9680722b78
commit 19c77eaae1
8 changed files with 257 additions and 62 deletions
@@ -1,6 +1,7 @@
package gmsclient
import (
"net/http"
"testing"
"github.com/grafana/grafana/pkg/setting"
@@ -16,7 +17,9 @@ func Test_buildBasePath(t *testing.T) {
CloudMigration: setting.CloudMigrationSettings{
GMSDomain: "",
},
})
},
http.DefaultClient,
)
require.Error(t, err)
// Domain is required
@@ -24,7 +27,9 @@ func Test_buildBasePath(t *testing.T) {
CloudMigration: setting.CloudMigrationSettings{
GMSDomain: "non-empty",
},
})
},
http.DefaultClient,
)
require.NoError(t, err)
client := c.(*gmsClientImpl)