Skip to content

Commit

Permalink
fixed tests, scoping, and methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Venne committed Jan 29, 2022
1 parent 6d7ee28 commit f151b29
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
6 changes: 3 additions & 3 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@
```typescript
import { FirewallStack } from 'cdk-nwfirewall'

new FirewallStack(scope: Resource, id: string, fwprops: FWVPCProps)
new FirewallStack(scope: Construct, id: string, fwprops: FWVPCProps)
```

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| [`scope`](#cdknwfirewallfirewallstackparameterscope)<span title="Required">*</span> | [`@aws-cdk/core.Resource`](#@aws-cdk/core.Resource) | *No description.* |
| [`scope`](#cdknwfirewallfirewallstackparameterscope)<span title="Required">*</span> | [`constructs.Construct`](#constructs.Construct) | *No description.* |
| [`id`](#cdknwfirewallfirewallstackparameterid)<span title="Required">*</span> | `string` | *No description.* |
| [`fwprops`](#cdknwfirewallfirewallstackparameterfwprops)<span title="Required">*</span> | [`cdk-nwfirewall.FWVPCProps`](#cdk-nwfirewall.FWVPCProps) | *No description.* |

---

##### `scope`<sup>Required</sup> <a name="cdk-nwfirewall.FirewallStack.parameter.scope" id="cdknwfirewallfirewallstackparameterscope"></a>

- *Type:* [`@aws-cdk/core.Resource`](#@aws-cdk/core.Resource)
- *Type:* [`constructs.Construct`](#constructs.Construct)

---

Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import * as logs from '@aws-cdk/aws-logs';
import * as fw from '@aws-cdk/aws-networkfirewall';
//import * as cr from '@aws-cdk/custom-resources';
import * as cdk from '@aws-cdk/core';
import { CustomResource } from '@aws-cdk/core';
import { Construct } from 'constructs';
//import { CustomResource } from '@aws-cdk/core';

export interface FWVPCProps {
readonly cidr?: string;
Expand Down
6 changes: 1 addition & 5 deletions test/firewall.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import '@aws-cdk/assert/jest';
test('run firewall test', () => {
const app = new cdk.App();
const stack = new cdk.Stack(app);
const firewall = new FirewallStack(stack, 'firewall', {});
new FirewallStack(stack, 'firewall', {});
//test one of the methods to see if returns a valid subnet

// const cfnVPCEndpoint = new CfnVPCEndpoint(this, 'MyCfnVPCEndpoint', {
Expand All @@ -20,10 +20,6 @@ test('run firewall test', () => {
// vpcEndpointType: 'vpcEndpointType',
// });
//test to see if it creates some of the expected resources
expect(firewall).toHaveResource('AWS::NetworkFirewall::Firewall');
expect(firewall).toHaveResource('AWS::EC2::Route', {
DestinationCidrBlock: '0.0.0.0/0',
});
},

);

0 comments on commit f151b29

Please sign in to comment.