From a9431de5bba037d4a47f23676a465479550313f1 Mon Sep 17 00:00:00 2001 From: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com> Date: Mon, 24 Jul 2023 15:38:21 -0500 Subject: [PATCH] Improve OSSFuzz client tests [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 <172697+naveensrinivasan@users.noreply.github.com> --- clients/ossfuzz/client_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/clients/ossfuzz/client_test.go b/clients/ossfuzz/client_test.go index a80efd5625a..7a964645833 100644 --- a/clients/ossfuzz/client_test.go +++ b/clients/ossfuzz/client_test.go @@ -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) + } + } }