File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed
internal/getproviders/reattach Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff 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",
You can’t perform that action at this time.
0 commit comments