Skip to content

Commit 164a20a

Browse files
authored
Merge pull request #161 from aws-samples/git-config
Git config - CDK tests workflow
2 parents 8cff6c8 + b27e2a2 commit 164a20a

16 files changed

+283
-32
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: blueprints-cdk-tests
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
blueprints-cdk-tests:
10+
name: Run CDK tests for all blueprints
11+
runs-on: ubuntu-latest
12+
defaults:
13+
run:
14+
shell: bash
15+
working-directory: scripts
16+
steps:
17+
- uses: actions/checkout@v2
18+
- uses: actions/setup-node@v3
19+
with:
20+
node-version: 19
21+
cache: npm
22+
cache-dependency-path: package-lock.json
23+
24+
- name: Install dependencies
25+
run: npm ci
26+
- name: Run unit tests
27+
run: ./run-all-cdk-tests.sh

.vscode/settings.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"cSpell.words": [
3+
"bcuser",
4+
"usermod"
5+
]
6+
}

lib/fantom/test/ha-nodes-stack.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,9 @@ describe("FantomHANodesStack", () => {
173173
{
174174
"CidrIp": "1.2.3.4/5",
175175
"Description": "Blockchain Node RPC",
176-
"FromPort": 8545,
176+
"FromPort": 18545,
177177
"IpProtocol": "tcp",
178-
"ToPort": 8545
178+
"ToPort": 18545
179179
}
180180
],
181181
VpcId: Match.anyValue(),
@@ -221,7 +221,7 @@ describe("FantomHANodesStack", () => {
221221
}
222222
],
223223
LoadBalancerArn: Match.anyValue(),
224-
Port: 8545,
224+
Port: 18545,
225225
Protocol: "HTTP"
226226
})
227227

@@ -230,12 +230,12 @@ describe("FantomHANodesStack", () => {
230230
HealthCheckEnabled: true,
231231
HealthCheckIntervalSeconds: 30,
232232
HealthCheckPath: "/",
233-
HealthCheckPort: "8545",
233+
HealthCheckPort: "18545",
234234
HealthyThresholdCount: 3,
235235
Matcher: {
236236
HttpCode: "200-299"
237237
},
238-
Port: 8545,
238+
Port: 18545,
239239
Protocol: "HTTP",
240240
TargetGroupAttributes: [
241241
{

lib/stacks/sample-configs/.env-sample-follower

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ STACKS_NETWORK="mainnet" # Network onto whi
3434

3535
# # Storage configuration
3636
# STACKS_DATA_VOL_SIZE=512 # Volume size in GB for node data storage
37-
# STACKS_DATA_VOL_TYPE="gp3" # EBS volume type. Example: "gp2", "io1" for high-performance needs
38-
# STACKS_DATA_VOL_IOPS=12000 # IOPS for "io1" volume type. IMPORTANT: Adjust based on performance needs
37+
# STACKS_DATA_VOL_TYPE="gp3" # EBS volume type. Example: "gp2", "io2" for high-performance needs
38+
# STACKS_DATA_VOL_IOPS=12000 # IOPS for "io2" volume type. IMPORTANT: Adjust based on performance needs
3939
# STACKS_DATA_VOL_THROUGHPUT=700 # Throughput in MB/s for "gp3" volume type. Check compatibility with chosen volume type
4040

4141
# # High Availability (HA) configuration

lib/stacks/test/.env-test

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ STACKS_MINER_SECRET_ARN="none" # Optional. ARN for
3232

3333
# Storage configuration
3434
STACKS_DATA_VOL_SIZE=128 # Volume size in GB for node data storage
35-
STACKS_DATA_VOL_TYPE="io1" # EBS volume type. Example: "gp2", "io1" for high-performance needs
36-
STACKS_DATA_VOL_IOPS=500 # IOPS for "io1" volume type. IMPORTANT: Adjust based on performance needs
37-
STACKS_DATA_VOL_THROUGHPUT=600 # Throughput in MB/s for "gp3" volume type. Check compatibility with chosen volume type
35+
STACKS_DATA_VOL_TYPE="gp3" # EBS volume type. Example: "gp2", "io2" for high-performance needs
36+
STACKS_DATA_VOL_IOPS=12000 # IOPS for "io2" volume type. IMPORTANT: Adjust based on performance needs
37+
STACKS_DATA_VOL_THROUGHPUT=700 # Throughput in MB/s for "gp3" volume type. Check compatibility with chosen volume type
3838

3939
# High Availability (HA) configuration
4040
STACKS_HA_ALB_HEALTHCHECK_GRACE_PERIOD_MIN=75 # Grace period in minutes for ALB health checks

lib/stacks/test/ha-nodes-stack.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ describe("StacksHANodesStack", () => {
9898
"DeleteOnTermination": true,
9999
"Encrypted": true,
100100
"Iops": TEST_STACKS_DATA_VOL_IOPS,
101-
"Throughput": TEST_STACKS_DATA_VOL_THROUGHPUT,
102101
"VolumeSize": TEST_STACKS_DATA_VOL_SIZE,
103102
"VolumeType": TEST_STACKS_DATA_VOL_TYPE
104103
}

lib/stacks/test/test-constants.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ export const TEST_BITCOIN_P2P_PORT: number = 1234
1616
export const TEST_STACKS_SIGNER_SECRET_ARN: string = "none"
1717
export const TEST_STACKS_MINER_SECRET_ARN: string = "none"
1818
export const TEST_STACKS_DATA_VOL_SIZE: number = 128
19-
export const TEST_STACKS_DATA_VOL_TYPE: string = "io1"
20-
export const TEST_STACKS_DATA_VOL_IOPS: number = 500
21-
export const TEST_STACKS_DATA_VOL_THROUGHPUT: number = 600
19+
export const TEST_STACKS_DATA_VOL_TYPE: string = "gp3"
20+
export const TEST_STACKS_DATA_VOL_IOPS: number = 12000
21+
export const TEST_STACKS_DATA_VOL_THROUGHPUT: number = 700
2222
export const TEST_STACKS_HA_ALB_HEALTHCHECK_GRACE_PERIOD_MIN: number = 75
2323
export const TEST_STACKS_HA_NODES_HEARTBEAT_DELAY_MIN: number = 12
2424
export const TEST_STACKS_HA_NUMBER_OF_NODES: number = 3

lib/sui/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import "dotenv/config"
33
import "source-map-support/register";
44
import * as cdk from "aws-cdk-lib";
55
import * as nag from "cdk-nag";
6-
import * as config from "./lib/config/suiConfig";
6+
import * as config from "./lib/config/node-config";
77
import {SuiCommonStack} from "./lib/common-stack";
88
import {SuiSingleNodeStack} from "./lib/single-node-stack";
99

lib/sui/lib/config/suiConfig.ts renamed to lib/sui/lib/config/node-config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as ec2 from "aws-cdk-lib/aws-ec2";
2-
import * as configTypes from "./suiConfig.interface";
2+
import * as configTypes from "./node-config.interface";
33
import * as constants from "../../../constructs/constants";
44

55

0 commit comments

Comments
 (0)