From d74054152aba9054919d9706c88bb8e31c0f39c6 Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Wed, 20 Nov 2024 10:59:28 +0000 Subject: [PATCH] chore: generate valid auth token (#59) --- packages/interop/test/compliance.spec.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/interop/test/compliance.spec.ts b/packages/interop/test/compliance.spec.ts index 792e9b1..f14f5b6 100644 --- a/packages/interop/test/compliance.spec.ts +++ b/packages/interop/test/compliance.spec.ts @@ -16,6 +16,16 @@ describe('pinning service compliance', function () { beforeEach(async () => { authtoken = nanoid() + // generate a token that can be passed as a CLI arg without tripping up the + // arg parser + while (true) { + if (authtoken.startsWith('-')) { + authtoken = nanoid() + } else { + break + } + } + helia = await createHelia() server = await createPinningServiceAPIServer(helia, { validateAccessToken: (token) => {