Skip to content

Commit

Permalink
fix: changing order in which args and commonOpts slices are combined (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
bradmiro authored Nov 8, 2023
1 parent bcc7523 commit 2dc6b44
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion infra/blueprint-test/pkg/bq/bq.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func RunCmdE(t testing.TB, cmd string, opts ...cmdOption) (string, error) {
args := strings.Fields(cmd)
bqCmd := shell.Command{
Command: "bq",
Args: append(args, gOpts.commonArgs...),
Args: append(gOpts.commonArgs, args...),
Logger: gOpts.logger,
}
return shell.RunCommandAndGetStdOutE(t, bqCmd)
Expand Down
4 changes: 2 additions & 2 deletions infra/blueprint-test/pkg/bq/bq_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func TestRunf(t *testing.T) {
}{
{
name: "Runf",
cmd: "ls --datasets --project_id=%s",
cmd: "query --nouse_legacy_sql 'select * FROM %s.samples.INFORMATION_SCHEMA.TABLES limit 1;'",
projectIdEnvVar: "bigquery-public-data",
},
}
Expand All @@ -41,7 +41,7 @@ func TestRunf(t *testing.T) {
if projectName, present := os.LookupEnv(tt.projectIdEnvVar); present {
op := Runf(t, tt.cmd, projectName)
assert := assert.New(t)
assert.Equal("bigquery#dataset", op.Array()[0].Get("kind").String())
assert.Contains(op.Array()[0], "creation_time")
} else {
t.Logf("Skipping test, %s envvar not set", tt.projectIdEnvVar)
t.Skip()
Expand Down

0 comments on commit 2dc6b44

Please sign in to comment.