Skip to content

Commit fa160c5

Browse files
committed
Add test case, make spell check happy with US English
1 parent 8299278 commit fa160c5

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

internal/getproviders/reattach/reattach_test.go

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,22 @@ func Test_parseReattachProviders(t *testing.T) {
129129
}(),
130130
},
131131
},
132+
"error - bad JSON": {
133+
// Missing closing brace
134+
reattachProviders: `{
135+
"test": {
136+
"Protocol": "grpc",
137+
"ProtocolVersion": 6,
138+
"Pid": 12345,
139+
"Test": true,
140+
"Addr": {
141+
"Network": "unix",
142+
"String":"/var/folders/xx/abcde12345/T/plugin12345"
143+
}
144+
}
145+
`,
146+
expectErr: true,
147+
},
132148
"error - bad provider address": {
133149
reattachProviders: `{
134150
"bad provider addr": {
@@ -144,7 +160,7 @@ func Test_parseReattachProviders(t *testing.T) {
144160
}`,
145161
expectErr: true,
146162
},
147-
"error - unrecognised protocol": {
163+
"error - unrecognized protocol": {
148164
reattachProviders: `{
149165
"test": {
150166
"Protocol": "carrier-pigeon",
@@ -159,7 +175,7 @@ func Test_parseReattachProviders(t *testing.T) {
159175
}`,
160176
expectErr: true,
161177
},
162-
"error - unrecognised network": {
178+
"error - unrecognized network": {
163179
reattachProviders: `{
164180
"test": {
165181
"Protocol": "grpc",

0 commit comments

Comments
 (0)