2017-11-13 13:42:19 |
Toto Bille |
description |
When searching for a snap with page and size, the size is not always the same. There are a few different cases:
CURRENT BEHAVIOR
Search for web:
PAGE 1
curl -s -H "X-Ubuntu-Architecture: $ARCH" -H "X-Ubuntu-Frameworks: $FRAMEWORKS" -H 'Accept: application/hal+json' 'https://search.apps.ubuntu.com/api/v1/snaps/search?q=web&page=1&size=10'
-> size(result['_embedded']['clickindex:package']) = 10 OK
PAGE 2
curl -s -H "X-Ubuntu-Architecture: $ARCH" -H "X-Ubuntu-Frameworks: $FRAMEWORKS" -H 'Accept: application/hal+json' 'https://search.apps.ubuntu.com/api/v1/snaps/search?q=web&page=2&size=10'
-> size(result['_embedded']['clickindex:package']) = 10 OK
PAGE N
... OK
web is OK
Now search for core:
PAGE 1
curl -s -H "X-Ubuntu-Architecture: $ARCH" -H "X-Ubuntu-Frameworks: $FRAMEWORKS" -H 'Accept: application/hal+json' 'https://search.apps.ubuntu.com/api/v1/snaps/search?q=core&page=1&size=10'
-> size(result['_embedded']['clickindex:package']) = 10 OK
PAGE 2
curl -s -H "X-Ubuntu-Architecture: $ARCH" -H "X-Ubuntu-Frameworks: $FRAMEWORKS" -H 'Accept: application/hal+json' 'https://search.apps.ubuntu.com/api/v1/snaps/search?q=core&page=2&size=10'
-> size(result['_embedded']['clickindex:package']) = 8 NOK
PAGE 3
curl -s -H "X-Ubuntu-Architecture: $ARCH" -H "X-Ubuntu-Frameworks: $FRAMEWORKS" -H 'Accept: application/hal+json' 'https://search.apps.ubuntu.com/api/v1/snaps/search?q=core&page=3&size=10'
-> size(result['_embedded']['clickindex:package']) = 3 NOK
PAGE N
... NOK
core is not OK
EXPECTED BEHAVIOR
All page, except the last page, should have 10 (in this case) snaps in their search |
When searching for a snap with page and size, the size is not always the same. There are a few different cases:
CURRENT BEHAVIOR
Search for web:
PAGE 1
curl -s -H "X-Ubuntu-Architecture: $ARCH" -H "X-Ubuntu-Frameworks: $FRAMEWORKS" -H 'Accept: application/hal+json' 'https://search.apps.ubuntu.com/api/v1/snaps/search?q=web&page=1&size=10'
-> size(result['_embedded']['clickindex:package']) = 10 OK
PAGE 2
curl -s -H "X-Ubuntu-Architecture: $ARCH" -H "X-Ubuntu-Frameworks: $FRAMEWORKS" -H 'Accept: application/hal+json' 'https://search.apps.ubuntu.com/api/v1/snaps/search?q=web&page=2&size=10'
-> size(result['_embedded']['clickindex:package']) = 10 OK
PAGE N
... OK
web is OK
Now search for core:
PAGE 1
curl -s -H "X-Ubuntu-Architecture: $ARCH" -H "X-Ubuntu-Frameworks: $FRAMEWORKS" -H 'Accept: application/hal+json' 'https://search.apps.ubuntu.com/api/v1/snaps/search?q=core&page=1&size=10'
-> size(result['_embedded']['clickindex:package']) = 10 OK
PAGE 2
curl -s -H "X-Ubuntu-Architecture: $ARCH" -H "X-Ubuntu-Frameworks: $FRAMEWORKS" -H 'Accept: application/hal+json' 'https://search.apps.ubuntu.com/api/v1/snaps/search?q=core&page=2&size=10'
-> size(result['_embedded']['clickindex:package']) = 8 NOK
PAGE 3
curl -s -H "X-Ubuntu-Architecture: $ARCH" -H "X-Ubuntu-Frameworks: $FRAMEWORKS" -H 'Accept: application/hal+json' 'https://search.apps.ubuntu.com/api/v1/snaps/search?q=core&page=3&size=10'
-> size(result['_embedded']['clickindex:package']) = 6 NOK
PAGE N
... NOK
core is not OK
EXPECTED BEHAVIOR
All page, except the last page, should have 10 (in this case) snaps in their search |
|