Skip to content

Commit 2e4fd31

Browse files
committed
add unit tests
1 parent 4b19349 commit 2e4fd31

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

internal/librarian/golang/version_test.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,26 @@ func TestClientDirectory(t *testing.T) {
196196
apiPath: "google/cloud/secretmanager/v1",
197197
want: "",
198198
},
199+
{
200+
name: "non existing GoAPI",
201+
library: &config.Library{
202+
Name: "secretmanager",
203+
APIs: []*config.API{
204+
{
205+
Path: "google/cloud/secretmanager/v1",
206+
},
207+
},
208+
Go: &config.GoModule{
209+
GoAPIs: []*config.GoAPI{
210+
{
211+
Path: "google/cloud/secretmanager/v1alpha1",
212+
},
213+
},
214+
},
215+
},
216+
apiPath: "google/cloud/secretmanager/v1",
217+
want: "",
218+
},
199219
{
200220
name: "from Go API",
201221
library: &config.Library{

0 commit comments

Comments
 (0)