Skip to content

Commit

Permalink
test: update conn_name_test.go (#926)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackwotherspoon authored Jan 27, 2025
1 parent 5ae88ea commit 9261b48
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions instance/conn_name_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ func TestParseConnName(t *testing.T) {
want ConnName
}{
{
"project:region:instance",
ConnName{project: "project", region: "region", name: "instance"},
name: "project:region:instance",
want: ConnName{project: "project", region: "region", name: "instance"},
},
{
"google.com:project:region:instance",
ConnName{project: "google.com:project", region: "region", name: "instance"},
name: "google.com:project:region:instance",
want: ConnName{project: "google.com:project", region: "region", name: "instance"},
},
{
"project:instance", // missing region
ConnName{},
name: "project:instance", // missing region
want: ConnName{},
},
}

Expand All @@ -41,7 +41,7 @@ func TestParseConnName(t *testing.T) {
t.Errorf("unexpected error: %e", err)
}
if c != tc.want {
t.Errorf("ParseConnName(%s) failed: want %v, got %v", tc.name, tc.want, err)
t.Errorf("ParseConnName(%s) failed: want %v, got %v", tc.name, tc.want, c)
}
}
}

0 comments on commit 9261b48

Please sign in to comment.