Skip to content

Commit

Permalink
fix tests breaks due to resource config change
Browse files Browse the repository at this point in the history
  • Loading branch information
patilpankaj212 committed Jan 6, 2021
1 parent d7a2543 commit fe2dca0
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 14 deletions.
24 changes: 16 additions & 8 deletions pkg/iac-providers/terraform/v12/testdata/tfjson/config1.json
Expand Up @@ -38,7 +38,8 @@
"vpc_security_group_ids": [
"${aws_security_group.sg_playground.id}"
]
}
},
"skip_rules": null
}
],
"aws_internet_gateway": [
Expand All @@ -53,7 +54,8 @@
"Environment": "${var.environment_tag}"
},
"vpc_id": "${aws_vpc.vpc_playground.id}"
}
},
"skip_rules": null
}
],
"aws_key_pair": [
Expand All @@ -66,7 +68,8 @@
"config": {
"key_name": "testKey",
"public_key": "${file(var.public_key_path)}"
}
},
"skip_rules": null
}
],
"aws_route_table": [
Expand All @@ -87,7 +90,8 @@
"Environment": "${var.environment_tag}"
},
"vpc_id": "${aws_vpc.vpc_playground.id}"
}
},
"skip_rules": null
}
],
"aws_route_table_association": [
Expand All @@ -100,7 +104,8 @@
"config": {
"route_table_id": "${aws_route_table.rtb_public_playground.id}",
"subnet_id": "${aws_subnet.subnet_public_playground.id}"
}
},
"skip_rules": null
}
],
"aws_security_group": [
Expand Down Expand Up @@ -144,7 +149,8 @@
"Environment": "${var.environment_tag}"
},
"vpc_id": "${aws_vpc.vpc_playground.id}"
}
},
"skip_rules": null
}
],
"aws_subnet": [
Expand All @@ -161,7 +167,8 @@
"Environment": "${var.environment_tag}"
},
"vpc_id": "${aws_vpc.vpc_playground.id}"
}
},
"skip_rules": null
}
],
"aws_vpc": [
Expand All @@ -178,7 +185,8 @@
"tags": {
"Environment": "${var.environment_tag}"
}
}
},
"skip_rules": null
}
]
}
12 changes: 8 additions & 4 deletions pkg/iac-providers/terraform/v12/testdata/tfjson/dummyconfig.json
Expand Up @@ -14,7 +14,8 @@
"profile": "${var.profile}",
"region": "${var.region}"
}
}
},
"skip_rules": null
}
],
"type1": [
Expand All @@ -39,7 +40,8 @@
"test1": "hello",
"test2": 5,
"test3": "${1 + 2}"
}
},
"skip_rules": null
}
],
"type2": [
Expand All @@ -60,7 +62,8 @@
"num": "${local.test2 + 5}",
"thing": "${[for x in local.arr: x * 2]}"
}
}
},
"skip_rules": null
}
],
"type3": [
Expand All @@ -75,7 +78,8 @@
"heredoc": "This is a heredoc template.\nIt references ${local.other.3}\n",
"heredoc2": "\t\tAnother heredoc, that\n\t\tdoesn't remove indentation\n\t\t${local.other.3}\n\t\t%{if true ? false : true}\"gotcha\"\\n%{else}4%{endif}\n",
"simple": "${4 - 2}"
}
},
"skip_rules": null
}
]
}
3 changes: 2 additions & 1 deletion pkg/writer/json_test.go
Expand Up @@ -18,7 +18,8 @@ const (
"config": {
"bucket": "${module.m3.fullbucketname}",
"policy": "${module.m2.fullbucketpolicy}"
}
},
"skip_rules": null
}
]
}`
Expand Down
3 changes: 2 additions & 1 deletion pkg/writer/yaml_test.go
Expand Up @@ -66,7 +66,8 @@ const (
type: aws_s3_bucket
config:
bucket: ${module.m3.fullbucketname}
policy: ${module.m2.fullbucketpolicy}`
policy: ${module.m2.fullbucketpolicy}
skiprules: []`

scanTestOutputYAML = `results:
violations:
Expand Down

0 comments on commit fe2dca0

Please sign in to comment.