SUSE / container-suseconnect

Provides access to repositories inside containers using the host entitlements
Apache License 2.0
19 stars 16 forks source link

Rework ReadConfigFromServer() to use json.Decoder #45

Closed rhafer closed 4 years ago

rhafer commented 4 years ago

Using Read() directly has the risk of doing a short read. E.g. on a busy machine it might not read an entire JSON Object in one call. Switch the implementation to use json.Decoder and rely on it doing the Right Thing (TM)

Adjust the Test Case accordingly to check for the correct error message.