Sort multi-value arrays before passing them off to pgtap for test
comparison. Otherwise, pgtap tests may fail with:
Failed test 5
have: {AAAC,AAAB}
want: {AAAB,AAAC}
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jeff Godin <jgodin@tadl.org>
-- AAAF deprecates AAAB, AAAC
SELECT is(
- (SELECT ARRAY_AGG(patch) FROM evergreen.upgrade_list_applied_deprecates('AAAF')),
+ ( SELECT ARRAY_AGG(patch)
+ FROM (
+ -- sort the patches to match the expected output
+ SELECT patch
+ FROM evergreen.upgrade_list_applied_deprecates('AAAF')
+ ORDER BY patch
+ ) AS patch
+ ),
'{AAAB,AAAC}'
);