Skip to content

Commit

Permalink
chore: fix lint
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Sagi-Kazar <[email protected]>
  • Loading branch information
sagikazarmark committed Nov 21, 2021
1 parent 655a0aa commit 35877c8
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions viper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ func TestGetConfigFile(t *testing.T) {
t.Run("config file set", func(t *testing.T) {
fs := afero.NewMemMapFs()

err := fs.Mkdir(testutil.AbsFilePath(t, "/etc/viper"), 0777)
err := fs.Mkdir(testutil.AbsFilePath(t, "/etc/viper"), 0o777)
require.NoError(t, err)

_, err = fs.Create(testutil.AbsFilePath(t, "/etc/viper/config.yaml"))
Expand All @@ -325,7 +325,7 @@ func TestGetConfigFile(t *testing.T) {
t.Run("find file", func(t *testing.T) {
fs := afero.NewMemMapFs()

err := fs.Mkdir(testutil.AbsFilePath(t, "/etc/viper"), 0777)
err := fs.Mkdir(testutil.AbsFilePath(t, "/etc/viper"), 0o777)
require.NoError(t, err)

_, err = fs.Create(testutil.AbsFilePath(t, "/etc/viper/config.yaml"))
Expand All @@ -344,7 +344,7 @@ func TestGetConfigFile(t *testing.T) {
t.Run("find files only", func(t *testing.T) {
fs := afero.NewMemMapFs()

err := fs.Mkdir(testutil.AbsFilePath(t, "/etc/config"), 0777)
err := fs.Mkdir(testutil.AbsFilePath(t, "/etc/config"), 0o777)
require.NoError(t, err)

_, err = fs.Create(testutil.AbsFilePath(t, "/etc/config/config.yaml"))
Expand All @@ -364,19 +364,19 @@ func TestGetConfigFile(t *testing.T) {
t.Run("precedence", func(t *testing.T) {
fs := afero.NewMemMapFs()

err := fs.Mkdir(testutil.AbsFilePath(t, "/home/viper"), 0777)
err := fs.Mkdir(testutil.AbsFilePath(t, "/home/viper"), 0o777)
require.NoError(t, err)

_, err = fs.Create(testutil.AbsFilePath(t, "/home/viper/config.zml"))
require.NoError(t, err)

err = fs.Mkdir(testutil.AbsFilePath(t, "/etc/viper"), 0777)
err = fs.Mkdir(testutil.AbsFilePath(t, "/etc/viper"), 0o777)
require.NoError(t, err)

_, err = fs.Create(testutil.AbsFilePath(t, "/etc/viper/config.bml"))
require.NoError(t, err)

err = fs.Mkdir(testutil.AbsFilePath(t, "/var/viper"), 0777)
err = fs.Mkdir(testutil.AbsFilePath(t, "/var/viper"), 0o777)
require.NoError(t, err)

_, err = fs.Create(testutil.AbsFilePath(t, "/var/viper/config.yaml"))
Expand All @@ -397,7 +397,7 @@ func TestGetConfigFile(t *testing.T) {
t.Run("without extension", func(t *testing.T) {
fs := afero.NewMemMapFs()

err := fs.Mkdir(testutil.AbsFilePath(t, "/etc/viper"), 0777)
err := fs.Mkdir(testutil.AbsFilePath(t, "/etc/viper"), 0o777)
require.NoError(t, err)

_, err = fs.Create(testutil.AbsFilePath(t, "/etc/viper/.dotfilenoext"))
Expand All @@ -418,7 +418,7 @@ func TestGetConfigFile(t *testing.T) {
t.Run("without extension and config type", func(t *testing.T) {
fs := afero.NewMemMapFs()

err := fs.Mkdir(testutil.AbsFilePath(t, "/etc/viper"), 0777)
err := fs.Mkdir(testutil.AbsFilePath(t, "/etc/viper"), 0o777)
require.NoError(t, err)

_, err = fs.Create(testutil.AbsFilePath(t, "/etc/viper/.dotfilenoext"))
Expand Down Expand Up @@ -466,7 +466,7 @@ func TestReadInConfig(t *testing.T) {
t.Run("find file", func(t *testing.T) {
fs := afero.NewMemMapFs()

err := fs.Mkdir(testutil.AbsFilePath(t, "/etc/viper"), 0777)
err := fs.Mkdir(testutil.AbsFilePath(t, "/etc/viper"), 0o777)
require.NoError(t, err)

file, err := fs.Create(testutil.AbsFilePath(t, "/etc/viper/config.yaml"))
Expand Down

0 comments on commit 35877c8

Please sign in to comment.