@@ -477,7 +477,7 @@ func TestDefault(t *testing.T) {
477477v .SetConfigType ("yaml" )
478478err := v .ReadConfig (bytes .NewBuffer (yamlExample ))
479479
480- assert .NoError (t , err )
480+ require .NoError (t , err )
481481assert .Equal (t , "leather" , v .Get ("clothing.jacket" ))
482482}
483483
@@ -1621,7 +1621,7 @@ func TestWrongDirsSearchNotFound(t *testing.T) {
16211621v .AddConfigPath (`thispathaintthere` )
16221622
16231623err := v .ReadInConfig ()
1624- assert .IsType (t , err , ConfigFileNotFoundError {"" , "" })
1624+ assert .IsType (t , ConfigFileNotFoundError {"" , "" }, err )
16251625
16261626// Even though config did not load and the error might have
16271627// been ignored by the client, the default still loads
@@ -1920,7 +1920,7 @@ func TestSafeWriteConfig(t *testing.T) {
19201920require .NoError (t , v .SafeWriteConfig ())
19211921read , err := afero .ReadFile (fs , testutil .AbsFilePath (t , "/test/c.yaml" ))
19221922require .NoError (t , err )
1923- assert .Equal (t , yamlWriteExpected , read )
1923+ assert .YAMLEq (t , string ( yamlWriteExpected ), string ( read ) )
19241924}
19251925
19261926func TestSafeWriteConfigWithMissingConfigPath (t * testing.T ) {
@@ -2501,7 +2501,7 @@ func TestKeyDelimiter(t *testing.T) {
25012501
25022502var actual config
25032503
2504- assert .NoError (t , v .Unmarshal (& actual ))
2504+ require .NoError (t , v .Unmarshal (& actual ))
25052505
25062506assert .Equal (t , expected , actual )
25072507}
0 commit comments