diff options
author | Steve Moyer <smoyer1@selesy.com> | 2022-11-27 20:51:37 -0500 |
---|---|---|
committer | Steve Moyer <smoyer1@selesy.com> | 2022-11-27 20:51:37 -0500 |
commit | 64c18b15a4a0c8b7e59587aa09de92d52c698ede (patch) | |
tree | 8738e651e57c3cf7a21ae76e9733206ccea7a6b9 /repository/config_testing.go | |
parent | c6bb6b9c7ecddb679966b1561e2e909a9ee5e8cd (diff) | |
download | git-bug-64c18b15a4a0c8b7e59587aa09de92d52c698ede.tar.gz |
feat: wrap ErrNoConfigEntry to report missing key
Resolves #935.
Diffstat (limited to 'repository/config_testing.go')
-rw-r--r-- | repository/config_testing.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/repository/config_testing.go b/repository/config_testing.go index f8a2762b..8c22934a 100644 --- a/repository/config_testing.go +++ b/repository/config_testing.go @@ -53,7 +53,7 @@ func testConfig(t *testing.T, config Config) { }, configs) _, err = config.ReadBool("section.true") - require.Equal(t, ErrNoConfigEntry, err) + require.ErrorIs(t, err, ErrNoConfigEntry) err = config.RemoveAll("section.nonexistingkey") require.Error(t, err) @@ -62,7 +62,7 @@ func testConfig(t *testing.T, config Config) { require.NoError(t, err) _, err = config.ReadString("section.key") - require.Equal(t, ErrNoConfigEntry, err) + require.ErrorIs(t, err, ErrNoConfigEntry) err = config.RemoveAll("nonexistingsection") require.Error(t, err) |