Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(binaries): improve local binaries test #1108

Merged
merged 1 commit into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ test/**/*.json

# build folder for Prisma CLI binaries
build/
out/

schema.temp.*.prisma
# sqlite artifacts
Expand Down
8 changes: 7 additions & 1 deletion binaries/binaries_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"log"
"os"
"path"
"testing"
"time"

Expand Down Expand Up @@ -34,7 +35,12 @@ func TestFetch_localDir(t *testing.T) {
t.Fatal(err)
}

if err := FetchNative(wd); err != nil {
dir := path.Join(wd, "out")

//goland:noinspection GoUnhandledErrorResult
defer os.RemoveAll(dir)

if err := FetchNative(dir); err != nil {
t.Fatalf("fetchEngine failed: %s", err)
}
}
Expand Down