Skip to content

Commit c624b89

Browse files
viacheslav-rostovtsevgopherbot
authored andcommitted
google: change the snake case endpoint to kebab-case
See b/524330105 and go/mds-universe-domain-underscore Change-Id: I378c2896b8ac3f01bd63dc9a0e34bd185aaf99ed Reviewed-on: https://go-review.googlesource.com/c/oauth2/+/791160 Reviewed-by: Cody Oss <codyoss@google.com> Commit-Queue: Robert Griesemer <gri@google.com> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Chris Smith <chrisdsmith@google.com> Reviewed-by: Robert Griesemer <gri@google.com> Auto-Submit: Robert Griesemer <gri@google.com>
1 parent 09a82f6 commit c624b89

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎google/default.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ func FindDefaultCredentialsWithParams(ctx context.Context, params CredentialsPar
253253
if metadata.OnGCE() {
254254
id, _ := metadata.ProjectID()
255255
universeDomainProvider := func() (string, error) {
256-
universeDomain, err := metadata.Get("universe/universe_domain")
256+
universeDomain, err := metadata.Get("universe/universe-domain")
257257
if err != nil {
258258
if _, ok := err.(metadata.NotDefinedError); ok {
259259
// http.StatusNotFound (404)

‎google/default_test.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ func TestCredentialsFromJSONWithParams_User_UniverseDomain_Params_UniverseDomain
256256
}
257257

258258
func TestComputeUniverseDomain(t *testing.T) {
259-
universeDomainPath := "/computeMetadata/v1/universe/universe_domain"
259+
universeDomainPath := "/computeMetadata/v1/universe/universe-domain"
260260
universeDomainResponseBody := "example.com"
261261
var requests int
262262
s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
@@ -277,7 +277,7 @@ func TestComputeUniverseDomain(t *testing.T) {
277277
Scopes: []string{scope},
278278
}
279279
universeDomainProvider := func() (string, error) {
280-
universeDomain, err := metadata.Get("universe/universe_domain")
280+
universeDomain, err := metadata.Get("universe/universe-domain")
281281
if err != nil {
282282
return "", err
283283
}

0 commit comments

Comments
 (0)