Merge pull request #10453 from SimonAlling/remove-runTestActionCmd

Remove runTestActionCmd and use runTestCmd instead
pull/10091/merge
Martin Hickey 3 years ago committed by GitHub
commit ee3f270e1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -71,27 +71,6 @@ func runTestCmd(t *testing.T, tests []cmdTestCase) {
}
}
func runTestActionCmd(t *testing.T, tests []cmdTestCase) {
t.Helper()
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
defer resetEnv()()
store := storageFixture()
for _, rel := range tt.rels {
store.Create(rel)
}
_, out, err := executeActionCommandC(store, tt.cmd)
if (err != nil) != tt.wantError {
t.Errorf("expected error, got '%v'", err)
}
if tt.golden != "" {
test.AssertGoldenString(t, out, tt.golden)
}
})
}
}
func storageFixture() *storage.Storage {
return storage.Init(driver.NewMemory())
}

@ -254,7 +254,7 @@ func TestInstall(t *testing.T) {
},
}
runTestActionCmd(t, tests)
runTestCmd(t, tests)
}
func TestInstallOutputCompletion(t *testing.T) {

Loading…
Cancel
Save