@@ -209,7 +209,7 @@ func TestGraphBuilder_Validation(t *testing.T) {
209209 "enableDNSSupport" : true ,
210210 "enableDNSHostnames" : true ,
211211 },
212- }, []string {"${status.state == 'available'}" }, nil ),
212+ }, []string {"${vpc. status.state == 'available'}" }, nil ),
213213 generator .WithResource ("subnet1" , map [string ]interface {}{
214214 "apiVersion" : "ec2.services.k8s.aws/v1alpha1" ,
215215 "kind" : "Subnet" ,
@@ -220,7 +220,7 @@ func TestGraphBuilder_Validation(t *testing.T) {
220220 "cidrBlock" : "10.0.1.0/24" ,
221221 "vpcID" : "${vpc.status.vpcID}" ,
222222 },
223- }, []string {"${status.state == 'available'}" }, []string {"${spec.enableSubnets == true}" }),
223+ }, []string {"${subnet1. status.state == 'available'}" }, []string {"${spec.enableSubnets == true}" }),
224224 generator .WithResource ("subnet2" , map [string ]interface {}{
225225 "apiVersion" : "ec2.services.k8s.aws/v1alpha1" ,
226226 "kind" : "Subnet" ,
@@ -231,7 +231,7 @@ func TestGraphBuilder_Validation(t *testing.T) {
231231 "cidrBlock" : "10.0.127.0/24" ,
232232 "vpcID" : "${vpc.status.vpcID}" ,
233233 },
234- }, []string {"${status.state == 'available'}" }, []string {"${spec.enableSubnets}" })},
234+ }, []string {"${subnet2. status.state == 'available'}" }, []string {"${spec.enableSubnets}" })},
235235 wantErr : false ,
236236 },
237237 {
@@ -1001,8 +1001,8 @@ func TestGraphBuilder_ExpressionParsing(t *testing.T) {
10011001 "cidrBlocks" : []interface {}{"10.0.0.0/16" },
10021002 },
10031003 }, []string {
1004- "${status.state == 'available'}" ,
1005- "${status.vpcID != ''}" ,
1004+ "${vpc. status.state == 'available'}" ,
1005+ "${vpc. status.vpcID != ''}" ,
10061006 }, nil ),
10071007 // Resource with mix of static and dynamic expressions
10081008 generator .WithResource ("subnet" , map [string ]interface {}{
@@ -1021,7 +1021,7 @@ func TestGraphBuilder_ExpressionParsing(t *testing.T) {
10211021 },
10221022 },
10231023 },
1024- }, []string {"${status.state == 'available'}" }, nil ),
1024+ }, []string {"${subnet. status.state == 'available'}" }, nil ),
10251025 // Non-standalone expressions
10261026 generator .WithResource ("cluster" , map [string ]interface {}{
10271027 "apiVersion" : "eks.services.k8s.aws/v1alpha1" ,
@@ -1038,7 +1038,7 @@ func TestGraphBuilder_ExpressionParsing(t *testing.T) {
10381038 },
10391039 },
10401040 }, []string {
1041- "${status.status == 'ACTIVE'}" ,
1041+ "${cluster. status.status == 'ACTIVE'}" ,
10421042 }, []string {
10431043 "${spec.createMonitoring}" ,
10441044 }),
@@ -1075,7 +1075,7 @@ func TestGraphBuilder_ExpressionParsing(t *testing.T) {
10751075 },
10761076 },
10771077 }, []string {
1078- "${status.phase == 'Running'}" ,
1078+ "${monitor. status.phase == 'Running'}" ,
10791079 }, []string {
10801080 "${spec.createMonitoring == true}" ,
10811081 }),
@@ -1091,8 +1091,8 @@ func TestGraphBuilder_ExpressionParsing(t *testing.T) {
10911091 vpc := g .Resources ["vpc" ]
10921092 assert .Empty (t , vpc .variables )
10931093 assert .Equal (t , []string {
1094- "status.state == 'available'" ,
1095- "status.vpcID != ''" ,
1094+ "vpc. status.state == 'available'" ,
1095+ "vpc. status.vpcID != ''" ,
10961096 }, vpc .GetReadyWhenExpressions ())
10971097 assert .Empty (t , vpc .GetIncludeWhenExpressions ())
10981098
0 commit comments