|
3 | 3 | // your assignment should fail to build. |
4 | 4 | "autograding_method" : "docker", |
5 | 5 | "container_options" : { |
6 | | - //States that a given testcase uses a router by default. (Default value is true) |
7 | | - "use_router" : true |
| 6 | + //States that a given testcase uses a router by default. (Default value is true) |
| 7 | + "use_router" : true |
8 | 8 | }, |
9 | 9 |
|
10 | 10 | "autograding" : { |
11 | | - "work_to_details" : [ "**/*.csv", "**/*.txt" ] |
| 11 | + "work_to_details" : [ "**/*.txt" ] |
12 | 12 | }, |
13 | 13 | // Each testcase creates a new, unique set of docker containers and networks. |
14 | 14 | "testcases" : [ |
15 | | - |
16 | | - // *************** TEST CASES ***************** |
17 | 15 | { |
18 | 16 | //Despite the default being true, this testcase will not use a router. |
19 | 17 | "use_router" : false, |
|
28 | 26 | //outgoing_connections list the containers that this container is allowed to network to. |
29 | 27 | "outgoing_connections" : ["client"] |
30 | 28 | // You can specify a docker image here, and if it is built on submitty, this container |
31 | | - // will use it. At the moment, this field defaults to ubuntu:custom if unset -- the default |
| 29 | + // will use it. If unset, this field defaults to ubuntu:custom -- the default |
32 | 30 | // submitty image. |
33 | 31 | //container_image : <image_name> |
34 | 32 | }, |
|
38 | 36 | // In this example, we want the server to start before the client, so we add a sleep command. |
39 | 37 | "commands" : ["sleep 2", "python3 client.py client 0"], |
40 | 38 | "outgoing_connections" : ["server"] |
41 | | - }, |
42 | | - { |
43 | | - // At the moment, a router should always be specified, which relays student messages. |
44 | | - // The router should have the unique name "router." |
45 | | - "container_name" : "router", |
46 | | - "commands" : ["python3 router.py"] |
47 | 39 | } |
48 | 40 | ], |
49 | 41 | "points" : 5, |
50 | 42 | "validation": [ |
51 | 43 | { |
52 | 44 | "method" : "diff", |
53 | | - //output files are stored in a directory that matches the container_name specified above. |
54 | 45 | "actual_file" : "server/STDOUT.txt", |
55 | 46 | "expected_file" : "expected_server_output_0.txt", |
56 | 47 | "failure_message" : "ERROR: Your code did not match the expected output.", |
|
70 | 61 | { |
71 | 62 | "title" : "Ping Pong, Ping Pong", |
72 | 63 | "containers" : [ |
| 64 | + //This testcase is using a router, which will be injected into the network. |
73 | 65 | { |
74 | 66 | "container_name" : "server", |
75 | | - "commands" : ["python3 server.py server"], //string or array of strings. |
| 67 | + "commands" : ["python3 server.py server"], |
76 | 68 | "outgoing_connections" : ["client"] |
77 | 69 | }, |
78 | 70 | { |
79 | 71 | "container_name" : "client", |
80 | 72 | "commands" : ["sleep 2", "python3 client.py client 1"], |
81 | 73 | "outgoing_connections" : ["server"] |
82 | | - }, |
83 | | - { |
84 | | - "container_name" : "router", |
85 | | - "commands" : ["python3 router.py"] |
86 | 74 | } |
87 | 75 | ], |
88 | 76 | "points" : 5, |
|
102 | 90 | "failure_message" : "ERROR: Your code did not match the expected output.", |
103 | 91 | "show_message" : "on_failure", |
104 | 92 | "deduction" : 0.5 |
| 93 | + }, |
| 94 | + //Adding this "sequence_diagram" filecheck will display a sequence diagram |
| 95 | + // of messages passed to the student. |
| 96 | + { |
| 97 | + "sequence_diagram" : true, |
| 98 | + "type" : "FileCheck", |
| 99 | + "title" : "Sequence Diagram Text File", |
| 100 | + "actual_file" : "router/sequence_diagram.txt", |
| 101 | + "points" : 0 |
105 | 102 | } |
106 | 103 | ] |
107 | 104 | }, |
|
110 | 107 | "containers" : [ |
111 | 108 | { |
112 | 109 | "container_name" : "server", |
113 | | - "commands" : ["python3 server.py server"], //string or array of strings. |
| 110 | + "commands" : ["python3 server.py server"], |
114 | 111 | "outgoing_connections" : ["client"] |
115 | 112 | }, |
116 | 113 | { |
117 | 114 | "container_name" : "client", |
118 | 115 | "commands" : ["sleep 2", "python3 client.py client 2"], |
119 | 116 | "outgoing_connections" : ["server"] |
120 | | - }, |
121 | | - { |
122 | | - "container_name" : "router", |
123 | | - "commands" : ["python3 router.py"] |
124 | 117 | } |
125 | 118 | ], |
126 | 119 | "points" : 5, |
|
140 | 133 | "failure_message" : "ERROR: Your code did not match the expected output.", |
141 | 134 | "show_message" : "on_failure", |
142 | 135 | "deduction" : 0.5 |
| 136 | + }, |
| 137 | + //Adding this "sequence_diagram" filecheck will display a sequence diagram |
| 138 | + // of messages passed to the student. |
| 139 | + { |
| 140 | + "sequence_diagram" : true, |
| 141 | + "type" : "FileCheck", |
| 142 | + "title" : "Sequence Diagram Text File", |
| 143 | + "actual_file" : "router/sequence_diagram.txt", |
| 144 | + "points" : 0 |
143 | 145 | } |
144 | 146 | ] |
145 | 147 | }, |
|
148 | 150 | "containers" : [ |
149 | 151 | { |
150 | 152 | "container_name" : "server", |
151 | | - "commands" : ["python3 server.py server"], //string or array of strings. |
| 153 | + "commands" : ["python3 server.py server"], |
152 | 154 | "outgoing_connections" : ["client"] |
153 | 155 | }, |
154 | 156 | { |
155 | 157 | "container_name" : "client", |
156 | 158 | "commands" : ["sleep 2", "python3 client.py client 3"], |
157 | 159 | "outgoing_connections" : ["server"] |
158 | | - }, |
159 | | - { |
160 | | - "container_name" : "router", |
161 | | - "commands" : ["python3 router.py"] |
162 | 160 | } |
163 | 161 | ], |
164 | 162 | "points" : 5, |
|
178 | 176 | "failure_message" : "ERROR: Your code did not match the expected output.", |
179 | 177 | "show_message" : "on_failure", |
180 | 178 | "deduction" : 0.5 |
| 179 | + }, |
| 180 | + //Adding this "sequence_diagram" filecheck will display a sequence diagram |
| 181 | + // of messages passed to the student. |
| 182 | + { |
| 183 | + "sequence_diagram" : true, |
| 184 | + "type" : "FileCheck", |
| 185 | + "title" : "Sequence Diagram Text File", |
| 186 | + "actual_file" : "router/sequence_diagram.txt", |
| 187 | + "points" : 0 |
181 | 188 | } |
182 | 189 | ] |
183 | 190 | }, |
|
187 | 194 | "containers" : [ |
188 | 195 | { |
189 | 196 | "container_name" : "server", |
190 | | - "commands" : ["python3 server.py server udp_enabled"], //string or array of strings. |
| 197 | + "commands" : ["python3 server.py server udp_enabled"], |
191 | 198 | "outgoing_connections" : ["client"] |
192 | 199 | }, |
193 | 200 | { |
194 | 201 | "container_name" : "client", |
195 | 202 | "commands" : ["sleep 2", "python3 client.py client 4 udp_enabled"], |
196 | 203 | "outgoing_connections" : ["server"] |
197 | 204 | }, |
| 205 | + //This testcase uses a custom router. This container must be named router |
| 206 | + // and will automatically be connected up correctly. |
198 | 207 | { |
199 | 208 | "container_name" : "router", |
200 | | - "commands" : ["python3 router.py"] |
| 209 | + "commands" : ["python3 custom_router.py"] |
201 | 210 | } |
202 | 211 | ], |
203 | 212 | "points" : 5, |
|
209 | 218 | "failure_message" : "ERROR: Your code did not match the expected output.", |
210 | 219 | "show_message" : "on_failure", |
211 | 220 | "deduction" : 1.0 |
| 221 | + }, |
| 222 | + //Adding this "sequence_diagram" filecheck will display a sequence diagram |
| 223 | + // of messages passed to the student. |
| 224 | + { |
| 225 | + "sequence_diagram" : true, |
| 226 | + "type" : "FileCheck", |
| 227 | + "title" : "Sequence Diagram Text File", |
| 228 | + "actual_file" : "router/sequence_diagram.txt", |
| 229 | + "points" : 0 |
212 | 230 | } |
213 | 231 | ] |
214 | 232 | } |
|
0 commit comments