Skip to content

Conversation

@mandryllo
Copy link
Collaborator

This PR is the third one in order to resolve #70 and it will represent type tests and default db integration tests

@mandryllo mandryllo added the enhancement New feature or request label Dec 8, 2025
@mandryllo mandryllo added 🚧 Work in progress Don't merge Do not merge this PR and removed 🚧 Work in progress Don't merge Do not merge this PR labels Dec 16, 2025
Base automatically changed from feat/db-v2-builder to master December 16, 2025 17:03
@mandryllo mandryllo changed the title feat: DB v2 tests feat: DB v2 test default db Dec 16, 2025
);

assert.ok(database.instance, 'Db instance should be defined');
assert.ok(database.dbSecurityGroup, 'Db security group should be defined');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Split into separate tests.

import { createSpinner } from 'nanospinner';
import { DatabaseTestContext } from '../test-context';

export async function cleanupSnapshots(ctx: DatabaseTestContext) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file is called after this function, but it contains another function as well. For now just have the util file and put everything inside it.

import { DescribeDBSubnetGroupsCommand } from '@aws-sdk/client-rds';
import { it } from 'node:test';

export function testDefaultDb(ctx: DatabaseTestContext) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing connection to db is not possible due to isolated subnets placement. But we should definitely use the SDK and check if actual db is created.

import { DescribeDBSubnetGroupsCommand } from '@aws-sdk/client-rds';
import { it } from 'node:test';

export function testDefaultDb(ctx: DatabaseTestContext) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Name of this suite is confusing to me. I would just put these tests as part of index.test.ts file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate Database to v2

4 participants