Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tests/contract/package/admin-package.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs';
import { createRequire } from 'node:module';
import { extname, join, relative, resolve } from 'node:path';
import { describe, expect, it } from 'vitest';
import { parse } from 'yaml';
import adminPlugin, { ADMIN_CAPABILITIES, ADMIN_ENV_SCHEMA } from '../../../src/plugin';
import type { PluginSiteContext, SiteExtensionContribution } from '@treeseed/sdk/site-contracts/plugin';
import { ADMIN_ROUTES, ADMIN_SUPPORT_ROUTES } from '../../../src/routes';
Expand Down Expand Up @@ -400,6 +401,13 @@ describe('@treeseed/admin identity and team surface', () => {
expect(existsSync('src/config.yaml')).toBe(true);
});

it('restores the required browser workload credential through declared development custody', () => {
const manifest = parse(readFileSync('treeseed.package.yaml', 'utf8'));
const web = manifest.development.targets.find((target: { id: string }) => target.id === 'web');
expect(web.secretRefs).toEqual({ TREESEED_IDENTITY_WORKLOAD_PRIVATE_KEY: 'identity-admin-workload' });
expect(web.operations.start.environment).not.toHaveProperty('TREESEED_IDENTITY_WORKLOAD_PRIVATE_KEY');
});

it('publishes its package-owned guarantee catalog and verifier declarations', () => {
const packageJson = JSON.parse(readFileSync('package.json', 'utf8')) as { files?: string[] };
const manifest = readFileSync('treeseed.package.yaml', 'utf8');
Expand Down
2 changes: 1 addition & 1 deletion treeseed.package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ development:
- { id: api, target: service, capability: control-plane-api, locality: either, reaction: none }
statePolicy: stateless
migrationPolicy: none
secretRefs: {}
secretRefs: { TREESEED_IDENTITY_WORKLOAD_PRIVATE_KEY: identity-admin-workload }
shutdown: { graceSeconds: 15, activeWorkPolicy: block }
resources: {}
logs: [.treeseed/development/web.log]
Expand Down
Loading