mirror of
https://github.com/supabase/supabase.git
synced 2026-09-22 13:37:53 +08:00
0bf22ee6fc
workers -> compute <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added the Compute experience for deploying, viewing, managing, and monitoring compute instances. - Added Compute navigation, instance detail pages, secrets, logs, deployment dialogs, generated snippets, and CLI commands. - Added filtering, status, availability, and data-loading support for compute instances. - **Updates** - Updated labels, icons, links, feature controls, unified logs, and secret-deletion messaging to use Compute terminology. - Compute routes now replace the previous Workers routes and pages. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
32 lines
1007 B
TypeScript
32 lines
1007 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
|
|
import {
|
|
buildComputeInstanceCliCommands,
|
|
buildComputeInstanceSnippets,
|
|
EXAMPLE_COMPUTE_INSTANCE,
|
|
} from './computeInstanceSnippets'
|
|
|
|
const input = (overrides: Partial<Parameters<typeof buildComputeInstanceSnippets>[0]> = {}) => ({
|
|
...EXAMPLE_COMPUTE_INSTANCE,
|
|
endpoint: 'abcdefgh.supabase.co',
|
|
...overrides,
|
|
})
|
|
|
|
describe('buildComputeInstanceSnippets', () => {
|
|
it('passes private exposure to the CLI and config', () => {
|
|
const { cli, configToml } = buildComputeInstanceSnippets(input({ access: 'private' }))
|
|
|
|
expect(cli).toContain('--exposure private')
|
|
expect(configToml).toContain('exposure = "private"')
|
|
})
|
|
})
|
|
|
|
describe('buildComputeInstanceCliCommands', () => {
|
|
it('targets the requested instance in every management command', () => {
|
|
const commands = buildComputeInstanceCliCommands('embed')
|
|
|
|
expect(commands).toHaveLength(4)
|
|
expect(commands.every(({ command }) => command.includes('embed'))).toBe(true)
|
|
})
|
|
})
|