Skip to content

Commit

Permalink
Modify duplicate test to prove proxyConfiguration is preserved
Browse files Browse the repository at this point in the history
  • Loading branch information
forevermatt committed May 14, 2024
1 parent ed89721 commit 9780172
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test.bats
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ EOF
echo "output = $output" 1>&2
}

@test "test createNewTaskDefJson with single container in definition" {
@test "test createNewTaskDefJson with existing proxyConfiguration value" {
imageWithoutTag="121212345678.dkr.ecr.us-east-1.amazonaws.com/acct/repo"
useImage="121212345678.dkr.ecr.us-east-1.amazonaws.com/acct/repo:1111111111"
TASK_DEFINITION=$(cat <<EOF
Expand Down Expand Up @@ -733,12 +733,15 @@ EOF
}
],
"placementConstraints": null,
"proxyConfiguration": {
"containerName": "example"
},
"revision": 123
}
}
EOF
)
expected='{ "family": "app-task-def", "volumes": [], "containerDefinitions": [ { "environment": [ { "name": "KEY", "value": "value * " } ], "name": "API", "links": [], "mountPoints": [], "image": "121212345678.dkr.ecr.us-east-1.amazonaws.com/acct/repo:1111111111", "essential": true, "portMappings": [ { "protocol": "tcp", "containerPort": 80, "hostPort": 10080 } ], "entryPoint": [], "memory": 128, "command": [ "/data/run.sh" ], "cpu": 200, "volumesFrom": [] } ], "placementConstraints": null, "networkMode": "bridge" }'
expected='{ "family": "app-task-def", "volumes": [], "containerDefinitions": [ { "environment": [ { "name": "KEY", "value": "value * " } ], "name": "API", "links": [], "mountPoints": [], "image": "121212345678.dkr.ecr.us-east-1.amazonaws.com/acct/repo:1111111111", "essential": true, "portMappings": [ { "protocol": "tcp", "containerPort": 80, "hostPort": 10080 } ], "entryPoint": [], "memory": 128, "command": [ "/data/run.sh" ], "cpu": 200, "volumesFrom": [] } ], "placementConstraints": null, "networkMode": "bridge", "proxyConfiguration": { "containerName": "example" } }'
run createNewTaskDefJson
[ ! -z $status ]
[ "$(echo "$output" | jq .)" == "$(echo "$expected" | jq .)" ]
Expand Down

0 comments on commit 9780172

Please sign in to comment.