util.EncodeJSON proven harmful, remove it everywhere
People were misusing EncodeJSON in tests when they should be using runtime.EncodeOrDie(testapi.Codec(), obj). Removing the potential for cutting self on sharp objects.
This commit is contained in:
@@ -284,10 +284,10 @@ func TestSynchonize(t *testing.T) {
|
||||
Node: &etcd.Node{
|
||||
Nodes: []*etcd.Node{
|
||||
{
|
||||
Value: util.EncodeJSON(controllerSpec1),
|
||||
Value: runtime.EncodeOrDie(testapi.Codec(), &controllerSpec1),
|
||||
},
|
||||
{
|
||||
Value: util.EncodeJSON(controllerSpec2),
|
||||
Value: runtime.EncodeOrDie(testapi.Codec(), &controllerSpec2),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user