From e604fe5baaa7da2468993f826453d2ae6b18a787 Mon Sep 17 00:00:00 2001 From: jxom <7336481+jxom@users.noreply.github.com> Date: Sun, 12 Jul 2026 12:19:57 +1000 Subject: [PATCH] test(tempo): gate local zone tests --- .env.example | 3 ++- test/vitest.config.ts | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index 5413768ba3..54829b8860 100644 --- a/.env.example +++ b/.env.example @@ -12,4 +12,5 @@ VITE_TEMPO_CREDENTIALS= # credentials for Tempo RPCs. format VITE_TEMPO_ENV=localnet # node environment. values: localnet|devnet|testnet VITE_TEMPO_LOG=false # whether to enable logs, if VITE_TEMPO_ENV=localnet. values: true|debug|error|trace|warn|info VITE_TEMPO_TAG=latest # docker image tag, if VITE_TEMPO_ENV=localnet. -VITE_TEMPO_HTTP_LOG=false # whether to enable logs on HTTP RPC requests. values: true|false \ No newline at end of file +VITE_TEMPO_ZONES=false # whether to run local Zone tests. values: true|false +VITE_TEMPO_HTTP_LOG=false # whether to enable logs on HTTP RPC requests. values: true|false diff --git a/test/vitest.config.ts b/test/vitest.config.ts index 54c08e6999..ff763cd3e5 100644 --- a/test/vitest.config.ts +++ b/test/vitest.config.ts @@ -1,6 +1,10 @@ import { join } from 'node:path' import { defineConfig, type TestProjectConfiguration } from 'vitest/config' +const zoneNodeConfigured = + (process.env.VITE_TEMPO_ENV || 'localnet') !== 'localnet' || + process.env.VITE_TEMPO_ZONES === 'true' + export default defineConfig({ test: { alias: [ @@ -72,6 +76,7 @@ export default defineConfig({ extends: true, test: { name: 'tempo', + exclude: [zoneNodeConfigured ? '' : 'src/tempo/actions/zone.test.ts'], include: ['src/tempo/**/*.test.ts'], setupFiles: [join(__dirname, './src/tempo/setup.ts')], globalSetup: [join(__dirname, './src/tempo/setup.global.ts')],