Skip to content

Commit 254275f

Browse files
tests: fix 'board' integrations
1 parent a8f185a commit 254275f

File tree

1 file changed

+50
-34
lines changed

1 file changed

+50
-34
lines changed

internal/integrationtest/board/hardware_loading_test.go

+50-34
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,22 @@ func TestHardwareLoading(t *testing.T) {
5050
jsonOut.MustContain(`[
5151
{
5252
"id": "arduino:avr",
53-
"installed": "1.8.6",
54-
"name": "Arduino AVR Boards",
55-
"boards": [
56-
{
57-
"name": "Arduino Uno",
58-
"fqbn": "arduino:avr:uno"
59-
},
60-
{
61-
"name": "Arduino Yún",
62-
"fqbn": "arduino:avr:yun"
53+
"installed_version": "1.8.6",
54+
"releases": {
55+
"1.8.6": {
56+
"name": "Arduino AVR Boards",
57+
"boards": [
58+
{
59+
"name": "Arduino Uno",
60+
"fqbn": "arduino:avr:uno"
61+
},
62+
{
63+
"name": "Arduino Yún",
64+
"fqbn": "arduino:avr:yun"
65+
}
66+
]
6367
}
64-
]
68+
}
6569
}
6670
]`)
6771
}
@@ -90,7 +94,7 @@ func TestHardwareLoading(t *testing.T) {
9094
"id": "avrispmkii",
9195
"name": "AVRISP mkII"
9296
}
93-
]
97+
]
9498
}`)
9599
}
96100

@@ -159,33 +163,41 @@ func TestHardwareLoading(t *testing.T) {
159163
jsonOut.MustContain(`[
160164
{
161165
"id": "arduino:avr",
162-
"installed": "1.8.6",
163-
"name": "Arduino AVR Boards",
164-
"boards": [
165-
{
166-
"name": "Arduino Uno",
167-
"fqbn": "arduino:avr:uno"
168-
},
169-
{
170-
"name": "Arduino Yún",
171-
"fqbn": "arduino:avr:yun"
166+
"installed_version": "1.8.6",
167+
"releases": {
168+
"1.8.6": {
169+
"name": "Arduino AVR Boards",
170+
"boards": [
171+
{
172+
"name": "Arduino Uno",
173+
"fqbn": "arduino:avr:uno"
174+
},
175+
{
176+
"name": "Arduino Yún",
177+
"fqbn": "arduino:avr:yun"
178+
}
179+
]
172180
}
173-
]
181+
}
174182
}
175183
]`)
176184
jsonOut.MustContain(`[
177185
{
178186
"id": "my_avr_platform:avr",
179-
"installed": "9.9.9",
180-
"name": "My AVR Boards",
181-
"boards": [
182-
{
183-
"name": "Arduino Yún",
184-
"fqbn": "my_avr_platform:avr:custom_yun"
187+
"installed_version": "9.9.9",
188+
"releases": {
189+
"9.9.9": {
190+
"name": "My AVR Boards",
191+
"missing_metadata": true,
192+
"boards": [
193+
{
194+
"name": "Arduino Yún",
195+
"fqbn": "my_avr_platform:avr:custom_yun"
196+
}
197+
]
185198
}
186-
],
187-
"manually_installed": true,
188-
"missing_metadata": true
199+
},
200+
"manually_installed": true
189201
}
190202
]`)
191203

@@ -196,7 +208,11 @@ func TestHardwareLoading(t *testing.T) {
196208
{
197209
"id": "my_symlinked_avr_platform:avr",
198210
"manually_installed": true,
199-
"missing_metadata": true
211+
"releases": {
212+
"9.9.9": {
213+
"missing_metadata": true
214+
}
215+
}
200216
}
201217
]`)
202218
}
@@ -226,7 +242,7 @@ func TestHardwareLoading(t *testing.T) {
226242
"id": "avrispmkii",
227243
"name": "AVRISP mkII"
228244
}
229-
]
245+
]
230246
}`)
231247
}
232248

0 commit comments

Comments
 (0)