Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
julienduchesne committed Sep 21, 2022
1 parent 628c729 commit 5ae2be3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/tanka/export_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package tanka

import (
"fmt"
"io/ioutil"
"io"
"log"
"os"
"path/filepath"
Expand Down Expand Up @@ -47,7 +47,7 @@ func Test_replaceTmplText(t *testing.T) {
func TestExportEnvironments(t *testing.T) {
tempDir := t.TempDir()
require.NoError(t, os.Chdir("testdata"))
defer os.Chdir("..")
defer func() { require.NoError(t, os.Chdir("..")) }()

// Find envs
envs, err := FindEnvs("test-export-envs", FindOpts{Selector: labels.Everything()})
Expand Down Expand Up @@ -86,7 +86,7 @@ func TestExportEnvironments(t *testing.T) {
}`)

// Try to re-export
assert.EqualError(t, ExportEnvironments(envs, tempDir, opts), fmt.Sprintf("Output dir `%s` not empty. Pass --merge to ignore this", tempDir))
assert.EqualError(t, ExportEnvironments(envs, tempDir, opts), fmt.Sprintf("output dir `%s` not empty. Pass --merge to ignore this", tempDir))

// Try to re-export with the --merge flag. Will still fail because Tanka will not overwrite manifests silently
opts.Merge = true
Expand Down Expand Up @@ -125,10 +125,10 @@ func TestExportEnvironments(t *testing.T) {
}

func BenchmarkExportEnvironmentsWithDeletePrevious(b *testing.B) {
log.SetOutput(ioutil.Discard)
log.SetOutput(io.Discard)
tempDir := b.TempDir()
require.NoError(b, os.Chdir("testdata"))
defer os.Chdir("..")
defer func() { require.NoError(b, os.Chdir("..")) }()

// Find envs
envs, err := FindEnvs("test-export-envs", FindOpts{Selector: labels.Everything()})
Expand Down

0 comments on commit 5ae2be3

Please sign in to comment.