Skip to content

Commit

Permalink
fix comparisons for unit test results
Browse files Browse the repository at this point in the history
  • Loading branch information
fillup committed Jul 24, 2018
1 parent fe62a42 commit 1b69415
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test.bats
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ 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" }'
run createNewTaskDefJson
[ ! -z $status ]
[ $output == $expected ]
[ "$output" == "$expected" ]
}

@test "test createNewTaskDefJson with single container in definition for AWS Fargate" {
Expand Down Expand Up @@ -344,7 +344,7 @@ 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": "awsvpc", "executionRoleArn": "arn:aws:iam::121212345678:role/ecsTaskExecutionRole", "requiresCompatibilities": [ "FARGATE" ], "cpu": "256", "memory": "512" }'
run createNewTaskDefJson
[ ! -z $status ]
[ $output == $expected ]
[ "$output" == "$expected" ]
}

@test "test createNewTaskDefJson with multiple containers in definition" {
Expand Down Expand Up @@ -428,7 +428,7 @@ 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": [] }, { "environment": [ { "name": "KEY", "value": "value" } ], "name": "cache", "links": [], "mountPoints": [], "image": "redis:latest", "essential": true, "portMappings": [ { "protocol": "tcp", "containerPort": 6376, "hostPort": 10376 } ], "entryPoint": [], "memory": 128, "command": [ "/data/run.sh" ], "cpu": 200, "volumesFrom": [] } ], "placementConstraints": null, "networkMode": "bridge" }'
run createNewTaskDefJson
[ ! -z $status ]
[ $output == $expected ]
[ "$output" == "$expected" ]
}

@test "test parseImageName with tagonly option" {
Expand Down Expand Up @@ -526,5 +526,5 @@ EOF
run createNewTaskDefJson
echo $output
[ ! -z $status ]
[ $output == $expected ]
[ "$output" == "$expected" ]
}

0 comments on commit 1b69415

Please sign in to comment.