e2etest staticcheck

This commit is contained in:
James Bardin 2020-12-01 12:37:08 -05:00
parent 1c58c6ba48
commit a1d41504f2
2 changed files with 5 additions and 2 deletions

View File

@ -154,13 +154,13 @@ func TestPrimaryChdirOption(t *testing.T) {
defer tf.Close()
//// INIT
stdout, stderr, err := tf.Run("-chdir=subdir", "init")
_, stderr, err := tf.Run("-chdir=subdir", "init")
if err != nil {
t.Fatalf("unexpected init error: %s\nstderr:\n%s", err, stderr)
}
//// PLAN
stdout, stderr, err = tf.Run("-chdir=subdir", "plan", "-out=tfplan")
stdout, stderr, err := tf.Run("-chdir=subdir", "plan", "-out=tfplan")
if err != nil {
t.Fatalf("unexpected plan error: %s\nstderr:\n%s", err, stderr)
}

View File

@ -55,6 +55,9 @@ func TestTerraformProvidersMirror(t *testing.T) {
}
var got []string
walkErr := filepath.Walk(outputDir, func(path string, info os.FileInfo, err error) error {
if err != nil {
return err
}
if info.IsDir() {
return nil // we only care about leaf files for this test
}