Skip to content

Commit

Permalink
Improve OSSFuzz client tests
Browse files Browse the repository at this point in the history
[clients/ossfuzz/client_test.go]
- Add a test for the `GetCreatedAt` method
- Fix the `URI` method to return the correct value

Signed-off-by: naveensrinivasan <[email protected]>
  • Loading branch information
naveensrinivasan committed Jul 24, 2023
1 parent 99e9657 commit a9431de
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions clients/ossfuzz/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,4 +353,16 @@ func TestAllClientMethods(t *testing.T) {
t.Errorf("ListLicenses: Expected %v, but got %v", clients.ErrUnsupportedFeature, err)
}
}
{
_, err := c.GetCreatedAt()
if !errors.Is(err, clients.ErrUnsupportedFeature) {
t.Errorf("GetCreatedAt: Expected %v, but got %v", clients.ErrUnsupportedFeature, err)
}
}
{
uri := c.URI()
if uri != "testURL" {
t.Errorf("URI: Expected %v, but got %v", "testURL", uri)
}
}
}

0 comments on commit a9431de

Please sign in to comment.