From c2cf5566f430a78cd76c76c855dbc1b64ea99a7f Mon Sep 17 00:00:00 2001 From: Christoph Blecker Date: Sun, 3 Sep 2023 18:29:27 -0700 Subject: [PATCH] Fix string to int conversion --- test/database/openshiftclusters.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/database/openshiftclusters.go b/test/database/openshiftclusters.go index c66720ac82e..bc9c017fe58 100644 --- a/test/database/openshiftclusters.go +++ b/test/database/openshiftclusters.go @@ -96,7 +96,7 @@ func fakeOpenshiftClustersMatchQuery(client cosmosdb.OpenShiftClusterDocumentCli results = append(results, r) } } - return cosmosdb.NewFakeOpenShiftClusterDocumentIterator(results, int(startingIndex)) + return cosmosdb.NewFakeOpenShiftClusterDocumentIterator(results, startingIndex) } func fakeOpenShiftClustersGetAllDocuments(client cosmosdb.OpenShiftClusterDocumentClient) ([]*api.OpenShiftClusterDocument, error) { @@ -109,9 +109,9 @@ func fakeOpenShiftClustersGetAllDocuments(client cosmosdb.OpenShiftClusterDocume return docs, nil } -func fakeOpenShiftClustersGetContinuation(options *cosmosdb.Options) (startingIndex int64, err error) { +func fakeOpenShiftClustersGetContinuation(options *cosmosdb.Options) (startingIndex int, err error) { if options != nil && options.Continuation != "" { - startingIndex, err = strconv.ParseInt(options.Continuation, 10, 64) + startingIndex, err = strconv.Atoi(options.Continuation) } return } @@ -132,7 +132,8 @@ func fakeOpenshiftClustersPrefixQuery(client cosmosdb.OpenShiftClusterDocumentCl results = append(results, r) } } - return cosmosdb.NewFakeOpenShiftClusterDocumentIterator(results, int(startingIndex)) + + return cosmosdb.NewFakeOpenShiftClusterDocumentIterator(results, startingIndex) } func fakeOpenShiftClustersRenewLeaseTrigger(ctx context.Context, doc *api.OpenShiftClusterDocument) error {