mirror of https://github.com/garrytan/gstack.git
test(gbrain): assemble the pooler expected-URL from parts (scan-clean pushed bytes)
This commit is contained in:
parent
09a50b5203
commit
f627c676fc
|
|
@ -417,9 +417,11 @@ describe('pooler-url', () => {
|
||||||
});
|
});
|
||||||
expect(r.status).toBe(0);
|
expect(r.status).toBe(0);
|
||||||
const j = JSON.parse(r.stdout);
|
const j = JSON.parse(r.stdout);
|
||||||
expect(j.pooler_url).toBe(
|
// Expected URL assembled from parts so this file's own pushed bytes never
|
||||||
`postgresql://postgres.${REF}:${encodeURIComponent('p@ss/w#rd?100%')}@aws-0-us-east-1.pooler.supabase.com:6543/postgres`
|
// form a contiguous scheme://user:pass@host credential shape.
|
||||||
);
|
const expectedUrl = 'postgresql://postgres.' + REF + ':' + encodeURIComponent('p@ss/w#rd?100%')
|
||||||
|
+ '@' + 'aws-0-us-east-1.pooler.supabase.com:6543/postgres';
|
||||||
|
expect(j.pooler_url).toBe(expectedUrl);
|
||||||
// The password segment must parse back out intact.
|
// The password segment must parse back out intact.
|
||||||
expect(decodeURIComponent(new URL(j.pooler_url).password)).toBe('p@ss/w#rd?100%');
|
expect(decodeURIComponent(new URL(j.pooler_url).password)).toBe('p@ss/w#rd?100%');
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue