@@ -477,7 +477,7 @@ func TestDefault(t *testing.T) {
477
477
v .SetConfigType ("yaml" )
478
478
err := v .ReadConfig (bytes .NewBuffer (yamlExample ))
479
479
480
- assert .NoError (t , err )
480
+ require .NoError (t , err )
481
481
assert .Equal (t , "leather" , v .Get ("clothing.jacket" ))
482
482
}
483
483
@@ -1621,7 +1621,7 @@ func TestWrongDirsSearchNotFound(t *testing.T) {
1621
1621
v .AddConfigPath (`thispathaintthere` )
1622
1622
1623
1623
err := v .ReadInConfig ()
1624
- assert .IsType (t , err , ConfigFileNotFoundError {"" , "" })
1624
+ assert .IsType (t , ConfigFileNotFoundError {"" , "" }, err )
1625
1625
1626
1626
// Even though config did not load and the error might have
1627
1627
// been ignored by the client, the default still loads
@@ -1920,7 +1920,7 @@ func TestSafeWriteConfig(t *testing.T) {
1920
1920
require .NoError (t , v .SafeWriteConfig ())
1921
1921
read , err := afero .ReadFile (fs , testutil .AbsFilePath (t , "/test/c.yaml" ))
1922
1922
require .NoError (t , err )
1923
- assert .Equal (t , yamlWriteExpected , read )
1923
+ assert .YAMLEq (t , string ( yamlWriteExpected ), string ( read ) )
1924
1924
}
1925
1925
1926
1926
func TestSafeWriteConfigWithMissingConfigPath (t * testing.T ) {
@@ -2501,7 +2501,7 @@ func TestKeyDelimiter(t *testing.T) {
2501
2501
2502
2502
var actual config
2503
2503
2504
- assert .NoError (t , v .Unmarshal (& actual ))
2504
+ require .NoError (t , v .Unmarshal (& actual ))
2505
2505
2506
2506
assert .Equal (t , expected , actual )
2507
2507
}
0 commit comments