forked from aws/amazon-ecs-agent
-
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.
ecs_client/model, functional_tests: devices and init support
This commit contains the model changes and functional tests for the new Task Definition fields-devices and initProcessEnabled. This addresses the following issues: * aws#433 * aws#852
- Loading branch information
Showing
7 changed files
with
264 additions
and
1 deletion.
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
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
10 changes: 10 additions & 0 deletions
10
agent/functional_tests/testdata/simpletests_unix/devices.json
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,10 @@ | ||
{ | ||
"Name": "Devices", | ||
"Description": "checks that adding devices works", | ||
"TaskDefinition": "devices", | ||
"Version": ">=1.0.0", | ||
"Timeout": "2m", | ||
"ExitCodes": { | ||
"exit": 42 | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
agent/functional_tests/testdata/simpletests_unix/init-process.json
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,10 @@ | ||
{ | ||
"Name": "InitProcessEnabled", | ||
"Description": "checks that enabling init process works", | ||
"TaskDefinition": "init-process", | ||
"Version": ">=1.14.5", | ||
"Timeout": "2m", | ||
"ExitCodes": { | ||
"exit": 42 | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
agent/functional_tests/testdata/taskdefinitions/devices/task-definition.json
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,19 @@ | ||
{ | ||
"family": "ecsftest-devices", | ||
"containerDefinitions": [{ | ||
"image": "127.0.0.1:51670/ubuntu:latest", | ||
"name": "exit", | ||
"cpu": 10, | ||
"memory": 10, | ||
"linuxParameters": { | ||
"devices":[ | ||
{ | ||
"hostPath": "/dev/xvda", | ||
"containerPath": "/dev/sda", | ||
"permissions": ["read"] | ||
} | ||
] | ||
}, | ||
"command": ["sh", "-c", "if ls /dev/sda && ! fdisk /dev/sda; then exit 42; else exit 1; fi"] | ||
}] | ||
} |
13 changes: 13 additions & 0 deletions
13
agent/functional_tests/testdata/taskdefinitions/init-process/task-definition.json
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,13 @@ | ||
{ | ||
"family": "ecsftest-init-process", | ||
"containerDefinitions": [{ | ||
"image": "127.0.0.1:51670/ubuntu:latest", | ||
"name": "exit", | ||
"cpu": 10, | ||
"memory": 10, | ||
"linuxParameters": { | ||
"initProcessEnabled":true | ||
}, | ||
"command": ["sh", "-c", "if pidof init == 1; then exit 42; else exit 1; fi"] | ||
}] | ||
} |
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