@@ -133,7 +133,7 @@ func TestRefreshUnitsError(t *testing.T) {
133133 defer server .Close ()
134134
135135 err = RefreshUnits (name , "foo" , server .URL + "/%s/%s.service" )
136- result := fmt . Sprintf ( "%v" , err )
136+ result := err . Error ( )
137137 expected := "404 Not Found"
138138
139139 if result != expected {
@@ -171,7 +171,7 @@ func TestScaling(t *testing.T) {
171171func TestScalingNonScalableComponent (t * testing.T ) {
172172 b := backendStub {}
173173 expected := "cannot scale controller component"
174- err := fmt . Sprintf ( "%v" , Scale ([]string {"controller=2" }, & b ))
174+ err := Scale ([]string {"controller=2" }, & b ). Error ( )
175175
176176 if err != expected {
177177 t .Error (fmt .Errorf ("Expected '%v', Got '%v'" , expected , err ))
@@ -181,7 +181,7 @@ func TestScalingNonScalableComponent(t *testing.T) {
181181func TestScalingInvalidFormat (t * testing.T ) {
182182 b := backendStub {}
183183 expected := "Could not parse: controller2"
184- err := fmt . Sprintf ( "%v" , Scale ([]string {"controller2" }, & b ))
184+ err := Scale ([]string {"controller2" }, & b ). Error ( )
185185
186186 if err != expected {
187187 t .Error (fmt .Errorf ("Expected '%v', Got '%v'" , expected , err ))
@@ -300,7 +300,7 @@ func TestStatusError(t *testing.T) {
300300 b := backendStub {}
301301
302302 expected := "Test Error"
303- err := fmt . Sprintf ( "%v" , Status ([]string {"blah" }, & b ))
303+ err := Status ([]string {"blah" }, & b ). Error ( )
304304
305305 if err != expected {
306306 t .Error (fmt .Errorf ("Expected '%v', Got '%v'" , expected , err ))
@@ -319,7 +319,7 @@ func TestJournalError(t *testing.T) {
319319 b := backendStub {}
320320
321321 expected := "Test Error"
322- err := fmt . Sprintf ( "%v" , Journal ([]string {"blah" }, & b ))
322+ err := Journal ([]string {"blah" }, & b ). Error ( )
323323
324324 if err != expected {
325325 t .Error (fmt .Errorf ("Expected '%v', Got '%v'" , expected , err ))
0 commit comments