From 335f57da380a58f2dbf354064d14772510c24e30 Mon Sep 17 00:00:00 2001 From: Paul Balaji <10051819+paulbalaji@users.noreply.github.com> Date: Wed, 8 Jan 2025 18:45:46 +0000 Subject: [PATCH] fix(infra): ensure all supported chains per env have owners (#5125) ### Description fix(infra): ensure all supported chains per env have owners - add test - add missing chains ### Drive-by changes ### Related issues ### Backward compatibility ### Testing yarn test - tried with + without fix and observed that it correctly fails without the additional chains being added --- .../infra/config/environments/mainnet3/owners.ts | 3 +++ .../infra/config/environments/testnet4/owners.ts | 6 ++++++ typescript/infra/test/environment.test.ts | 16 ++++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 typescript/infra/test/environment.test.ts diff --git a/typescript/infra/config/environments/mainnet3/owners.ts b/typescript/infra/config/environments/mainnet3/owners.ts index 01fe1e84b5..27d3d5915c 100644 --- a/typescript/infra/config/environments/mainnet3/owners.ts +++ b/typescript/infra/config/environments/mainnet3/owners.ts @@ -243,4 +243,7 @@ export const chainOwners: ChainMap = { osmosis: { owner: 'n/a - nothing owned here', }, + soon: { + owner: 'n/a - nothing owned here', + }, }; diff --git a/typescript/infra/config/environments/testnet4/owners.ts b/typescript/infra/config/environments/testnet4/owners.ts index 00f3b00f96..3fb009a93c 100644 --- a/typescript/infra/config/environments/testnet4/owners.ts +++ b/typescript/infra/config/environments/testnet4/owners.ts @@ -13,4 +13,10 @@ export const owners: ChainMap = { ]), ), // [chainMetadata.solanadevnet.name]: SEALEVEL_DEPLOYER_ADDRESS, + eclipsetestnet: { + owner: 'n/a - nothing owned here', + }, + solanatestnet: { + owner: 'n/a - nothing owned here', + }, }; diff --git a/typescript/infra/test/environment.test.ts b/typescript/infra/test/environment.test.ts new file mode 100644 index 0000000000..665832a6d9 --- /dev/null +++ b/typescript/infra/test/environment.test.ts @@ -0,0 +1,16 @@ +import { expect } from 'chai'; + +import { environments } from '../config/environments/index.js'; + +describe('Environment', () => { + for (const env of Object.values(environments)) { + it(`Has owners configured for ${env.environment}`, () => { + for (const chain of env.supportedChainNames) { + expect( + env.owners[chain], + `Missing owner for chain ${chain} in environment ${env.environment}`, + ).to.not.be.undefined; + } + }); + } +});