mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
[kibana] Thank you for everything, Spencer! 🧔🏻♂️ (#150759)
## Summary > _Inspired by @kertal, and extracted from his PR https://github.com/elastic/kibana/pull/150660, specifically @thomasneirynck's [proposal](https://github.com/elastic/kibana/pull/150660/files#r1101795511)._ > > _Holding for 24 hours, for our friends in later time zones._ Several of us felt a dev-only easter egg-- where, if you're lucky, @spalger joins you as you test your latest feature-- would be a fun tribute as he leaves us for new and exciting opportunities. Elasticians, feel free to send your love to @spalger in the channel of your choice, of course, but we'd appreciate your review of this pull request. ❤️  --------- Co-authored-by: spalger <spencer@elastic.co>
This commit is contained in:
parent
74e61b57d9
commit
43fa5174f8
2 changed files with 6 additions and 3 deletions
|
@ -22,7 +22,10 @@ import { Log } from './log';
|
|||
|
||||
const ONE_GIGABYTE = 1024 * 1024 * 1024;
|
||||
const alphabet = 'abcdefghijklmnopqrztuvwxyz'.split('');
|
||||
const getRandomBasePath = () => sampleSize(alphabet, 3).join('');
|
||||
|
||||
// Thank you, Spencer! :elasticheart:
|
||||
const getRandomBasePath = () =>
|
||||
Math.random() * 100 < 1 ? 'spalger' : sampleSize(alphabet, 3).join('');
|
||||
|
||||
export interface BasePathProxyServerOptions {
|
||||
shouldRedirectFromOldBasePath: (path: string) => boolean;
|
||||
|
|
|
@ -81,10 +81,10 @@ describe('BasePathProxyServer', () => {
|
|||
await proxySupertest.get('/').expect(302);
|
||||
});
|
||||
|
||||
test('root URL will return a redirect location with exactly 3 characters that are a-z', async () => {
|
||||
test('root URL will return a redirect location with exactly 3 characters that are a-z (or spalger)', async () => {
|
||||
const res = await proxySupertest.get('/');
|
||||
const location = res.header.location;
|
||||
expect(location).toMatch(/[a-z]{3}/);
|
||||
expect(location).toMatch(/^\/(spalger|[a-z]{3})$/);
|
||||
});
|
||||
|
||||
test('forwards request with the correct path', async () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue