mirror of
https://github.com/awalsh128/cache-apt-pkgs-action.git
synced 2026-07-30 02:19:10 +00:00
Fix test to reflect new filename.
This commit is contained in:
parent
90d6c1c39e
commit
85fe267c5d
|
|
@ -20,7 +20,7 @@ func contains(arr []string, element string) bool {
|
||||||
// Writes a message to STDERR and exits with status 1.
|
// Writes a message to STDERR and exits with status 1.
|
||||||
func exitOnError(format string, arg ...any) {
|
func exitOnError(format string, arg ...any) {
|
||||||
fmt.Fprintln(os.Stderr, fmt.Errorf(format+"\n", arg...))
|
fmt.Fprintln(os.Stderr, fmt.Errorf(format+"\n", arg...))
|
||||||
fmt.Println("Usage: apt_query.go normalized-list <package names>")
|
fmt.Println("Usage: apt_query normalized-list <package names>")
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ type RunResult struct {
|
||||||
func run(t *testing.T, command string, pkgNames ...string) RunResult {
|
func run(t *testing.T, command string, pkgNames ...string) RunResult {
|
||||||
stdout := &bytes.Buffer{}
|
stdout := &bytes.Buffer{}
|
||||||
stderr := &bytes.Buffer{}
|
stderr := &bytes.Buffer{}
|
||||||
cmd := exec.Command("go", append([]string{"run", "apt_query.go", command}, pkgNames...)...)
|
cmd := exec.Command("go", append([]string{"run", "main.go", command}, pkgNames...)...)
|
||||||
cmd.Stdout = stdout
|
cmd.Stdout = stdout
|
||||||
cmd.Stderr = stderr
|
cmd.Stderr = stderr
|
||||||
err := cmd.Run()
|
err := cmd.Run()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue