method update

Signed-off-by: Meredith Lancaster <malancas@github.com>
This commit is contained in:
Meredith Lancaster 2025-01-13 12:47:25 -07:00
parent b7f6af03b5
commit 611eb86e68
2 changed files with 5 additions and 5 deletions

View file

@ -166,7 +166,7 @@ func (c *LiveClient) fetchBundleFromAttestations(attestations []*Attestation) ([
}
// otherwise fetch the bundle with the provided URL
b, err := c.GetBundle(a.BundleURL)
b, err := c.getBundle(a.BundleURL)
if err != nil {
return fmt.Errorf("failed to fetch bundle with URL: %w", err)
}
@ -184,7 +184,7 @@ func (c *LiveClient) fetchBundleFromAttestations(attestations []*Attestation) ([
return fetched, nil
}
func (c *LiveClient) GetBundle(url string) (*bundle.Bundle, error) {
func (c *LiveClient) getBundle(url string) (*bundle.Bundle, error) {
c.logger.VerbosePrintf("Fetching attestation bundle with bundle URL\n\n")
var sgBundle *bundle.Bundle

View file

@ -266,7 +266,7 @@ func TestGetBundle(t *testing.T) {
logger: io.NewTestHandler(),
}
b, err := c.GetBundle("whatever")
b, err := c.getBundle("whatever")
require.NoError(t, err)
require.Equal(t, "application/vnd.dev.sigstore.bundle.v0.3+json", b.GetMediaType())
mockHTTPClient.AssertNumberOfCalls(t, "OnGetSuccess", 1)
@ -283,7 +283,7 @@ func TestGetBundle_Retry(t *testing.T) {
logger: io.NewTestHandler(),
}
b, err := c.GetBundle("whatever")
b, err := c.getBundle("whatever")
require.NoError(t, err)
require.Equal(t, "application/vnd.dev.sigstore.bundle.v0.3+json", b.GetMediaType())
mockHTTPClient.AssertNumberOfCalls(t, "OnGetFailAfterNCalls", 2)
@ -296,7 +296,7 @@ func TestGetBundle_Fail(t *testing.T) {
logger: io.NewTestHandler(),
}
b, err := c.GetBundle("whatever")
b, err := c.getBundle("whatever")
require.Error(t, err)
require.Nil(t, b)
mockHTTPClient.AssertNumberOfCalls(t, "OnGetFail", 1)