[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. ❤️


![image](https://user-images.githubusercontent.com/1178348/217867285-b23dcf1f-1a4a-45fd-b828-f6b24215fef2.png)

---------

Co-authored-by: spalger <spencer@elastic.co>
This commit is contained in:
Clint Andrew Hall 2023-02-10 17:57:43 -05:00 committed by GitHub
parent 74e61b57d9
commit 43fa5174f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View file

@ -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;

View file

@ -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 () => {