Skip to content

Commit 8938a8e

Browse files
BenjaminKazemicopybara-github
authored andcommitted
chore(vertexai): Add some tests
FUTURE_COPYBARA_INTEGRATE_REVIEW=#14351 from renovate-bot:renovate/main-deps 2e7e530 PiperOrigin-RevId: 895405821
1 parent c40e42f commit 8938a8e

3 files changed

Lines changed: 13 additions & 2 deletions

File tree

vertexai/genai/client_test.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,3 +739,14 @@ func printResponse(resp *GenerateContentResponse) {
739739
}
740740
fmt.Println("---")
741741
}
742+
743+
func TestNewGenAIClient(t *testing.T) {
744+
ctx := context.Background()
745+
client, err := NewGenAIClient(ctx, nil)
746+
if err != nil {
747+
t.Fatal(err)
748+
}
749+
if client == nil {
750+
t.Error("client must not be nil")
751+
}
752+
}

vertexai/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ require (
4242
google.golang.org/genproto/googleapis/api v0.0.0-20260401001100-f93e5f3e9f0f // indirect
4343
google.golang.org/genproto/googleapis/rpc v0.0.0-20260401001100-f93e5f3e9f0f // indirect
4444
google.golang.org/grpc v1.79.3 // indirect
45-
)
45+
)

vertexai/go.sum

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,4 @@ google.golang.org/grpc v1.79.3/go.mod h1:KmT0Kjez+0dde/v2j9vzwoAScgEPx/Bw1CYChhH
9797
google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=
9898
google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
9999
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
100-
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
100+
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

0 commit comments

Comments
 (0)