forked from theonestack/hl-component-vpc-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'theonestack:master' into master
- Loading branch information
Showing
13 changed files
with
1,972 additions
and
1,766 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
name: cftest | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
rspec: | ||
uses: theonestack/shared-workflows/.github/workflows/rspec.yaml@main | ||
secrets: inherit |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
dns_domain: | ||
Fn::Join: | ||
- '.' | ||
- - Ref: EnvironmentName | ||
- Fn::Sub: ${DnsDomain}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
require 'yaml' | ||
require 'spec_helper' | ||
|
||
describe 'compiled component' do | ||
|
||
context 'cftest' do | ||
it 'compiles test' do | ||
expect(system("cfhighlander cftest #{@validate} --tests tests/custom_routes.test.yaml")).to be_truthy | ||
end | ||
end | ||
|
||
let(:template) { YAML.load_file("#{File.dirname(__FILE__)}/../out/tests/custom_routes/vpc-v2.compiled.yaml") } | ||
|
||
context 'Resource CustomRoute00' do | ||
|
||
let(:properties) { template["Resources"]["CustomRoute00"]["Properties"] } | ||
|
||
it 'has property RouteTableId' do | ||
expect(properties["RouteTableId"]).to eq({"Ref"=>"RouteTablePrivate0"}) | ||
end | ||
|
||
it 'has property DestinationCidrBlock' do | ||
expect(properties["DestinationCidrBlock"]).to eq("192.168.1.0/24") | ||
end | ||
|
||
it 'has property TransitGatewayId' do | ||
expect(properties["TransitGatewayId"]).to eq("tgw-0a9c82d1928fce121") | ||
end | ||
|
||
end | ||
|
||
context 'Resource CustomRoute01' do | ||
|
||
let(:properties) { template["Resources"]["CustomRoute11"]["Properties"] } | ||
|
||
it 'has property RouteTableId' do | ||
expect(properties["RouteTableId"]).to eq({"Ref"=>"RouteTablePrivate1"}) | ||
end | ||
|
||
it 'has property DestinationCidrBlock' do | ||
expect(properties["DestinationCidrBlock"]).to eq("10.8.0.0/16") | ||
end | ||
|
||
it 'has property TransitGatewayId' do | ||
expect(properties["VpcPeeringConnectionId"]).to eq("pcx-1c1f309b02067137e") | ||
end | ||
|
||
end | ||
|
||
context 'Resource CustomRoute05' do | ||
|
||
let(:properties) { template["Resources"]["CustomRoute05"]["Properties"] } | ||
|
||
it 'has property RouteTableId' do | ||
expect(properties["RouteTableId"]).to eq({"Ref"=>"RouteTablePrivate0"}) | ||
end | ||
|
||
it 'has property DestinationCidrBlock' do | ||
expect(properties["DestinationCidrBlock"]).to eq("192.168.65.0/22") | ||
end | ||
|
||
it 'has property TransitGatewayId' do | ||
expect(properties["TransitGatewayId"]).to eq({"Ref" => "TransitGateway"}) | ||
end | ||
|
||
end | ||
|
||
end |
Oops, something went wrong.