-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
19 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,16 +78,16 @@ func TestFlags(t *testing.T) { | |
{ | ||
"gen", | ||
"", | ||
[]string{"-tool", "-m", "gemini-1.5-pro", "list known models"}, | ||
[]string{"-tool", "list known models"}, | ||
0, | ||
[]string{"gemini-1.5-flash"}, | ||
}, | ||
{ | ||
"gen", | ||
"", | ||
[]string{"-tool", "-m", "gemini-1.5-pro", "-p", "DSN=postgres://steampipe:[email protected]:9193/steampipe", "retrieve AWS account IDs"}, | ||
[]string{"-tool", "-p", "DSN=postgres://steampipe:[email protected]:9193/steampipe", "retrieve AWS account IDs"}, | ||
0, | ||
[]string{"["}, | ||
[]string{"connection refused"}, | ||
}, | ||
} | ||
|
||
|
@@ -98,14 +98,14 @@ func TestFlags(t *testing.T) { | |
var out bytes.Buffer | ||
actualExit := emitGen(strings.NewReader(test.stdin), &out) | ||
if test.wantExit != actualExit { | ||
t.Errorf("Wrong exit code for args: %v %v, expected: %v, got: %v", | ||
test.stdin, test.args, test.wantExit, actualExit) | ||
t.Errorf("Wrong exit code for args: %v, expected: %v, got: %v", | ||
test.args, test.wantExit, actualExit) | ||
continue | ||
} | ||
actualOutput := out.String() | ||
if !anyMatches([]string{actualOutput}, test.wantOutput...) { | ||
t.Errorf("Wrong output for args: %v %v, expected: %v, got: %v", | ||
test.stdin, test.args, strings.Join(test.wantOutput, ","), actualOutput) | ||
t.Errorf("Wrong output for args: %v, expected one of: %v, got: %v", | ||
test.args, strings.Join(test.wantOutput, ","), actualOutput) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters