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

fix: use separate gptscript for window cred override test #47

Merged
merged 1 commit into from
Jul 22, 2024
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
7 changes: 6 additions & 1 deletion gptscript_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,12 @@ func TestCredentialOverride(t *testing.T) {
t.Fatalf("Error getting working directory: %v", err)
}

run, err := g.Run(context.Background(), wd+"/test/credential-override.gpt", Options{
gptscriptFile := "credential-override.gpt"
if runtime.GOOS == "windows" {
gptscriptFile = "credential-override-windows.gpt"
}

run, err := g.Run(context.Background(), filepath.Join(wd, "test", gptscriptFile), Options{
DisableCache: true,
CredentialOverrides: []string{
"test.ts.credential_override:TEST_CRED=foo",
Expand Down
5 changes: 5 additions & 0 deletions test/credential-override-windows.gpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
credentials: github.com/gptscript-ai/credential as test.ts.credential_override with TEST_CRED as env

#!/usr/bin/env powershell.exe

echo "$env:TEST_CRED"