-
Notifications
You must be signed in to change notification settings - Fork 1
feat: DB v2 test default db #94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
b052530 to
63c1af7
Compare
59312da to
04800c7
Compare
# Conflicts: # src/v2/components/database/index.ts
This reverts commit f361e34.
04800c7 to
41783a5
Compare
| ); | ||
|
|
||
| assert.ok(database.instance, 'Db instance should be defined'); | ||
| assert.ok(database.dbSecurityGroup, 'Db security group should be defined'); |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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.
This PR is the third one in order to resolve #70 and it will represent type tests and default db integration tests