Skip to content

Commit

Permalink
chore: give e2e tests more readable run id (#240)
Browse files Browse the repository at this point in the history
  • Loading branch information
nolanmar511 committed Jun 15, 2018
1 parent 1695e19 commit e0b5ecb
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions testing/integration_test.go
Expand Up @@ -22,6 +22,7 @@ import (
"fmt"
"os"
"runtime"
"strings"
"testing"
"text/template"
"time"
Expand All @@ -37,7 +38,7 @@ var (
branch = flag.String("branch", "", "git branch to test")
commit = flag.String("commit", "", "git commit to test")
pr = flag.Int("pr", 0, "git pull request to test")
runID = time.Now().Unix()
runID = strings.Replace(time.Now().Format("2006-01-02-15-04-05.000000-0700"), ".", "-", -1)
)

const cloudScope = "https://www.googleapis.com/auth/cloud-platform"
Expand Down Expand Up @@ -187,43 +188,43 @@ func TestAgentIntegration(t *testing.T) {
InstanceConfig: proftest.InstanceConfig{
ProjectID: projectID,
Zone: zone,
Name: fmt.Sprintf("profiler-test-node6-%d", runID),
Name: fmt.Sprintf("profiler-test-node6-%s", runID),
MachineType: "n1-standard-1",
},
name: fmt.Sprintf("profiler-test-node6-%d-gce", runID),
name: fmt.Sprintf("profiler-test-node6-%s-gce", runID),
wantProfiles: []profileSummary{{"WALL", "busyLoop"}, {"HEAP", "benchmark"}},
nodeVersion: "6",
},
{
InstanceConfig: proftest.InstanceConfig{
ProjectID: projectID,
Zone: zone,
Name: fmt.Sprintf("profiler-test-node8-%d", runID),
Name: fmt.Sprintf("profiler-test-node8-%s", runID),
MachineType: "n1-standard-1",
},
name: fmt.Sprintf("profiler-test-node8-%d-gce", runID),
name: fmt.Sprintf("profiler-test-node8-%s-gce", runID),
wantProfiles: []profileSummary{{"WALL", "busyLoop"}, {"HEAP", "benchmark"}},
nodeVersion: "8",
},
{
InstanceConfig: proftest.InstanceConfig{
ProjectID: projectID,
Zone: zone,
Name: fmt.Sprintf("profiler-test-node9-%d", runID),
Name: fmt.Sprintf("profiler-test-node9-%s", runID),
MachineType: "n1-standard-1",
},
name: fmt.Sprintf("profiler-test-node9-%d-gce", runID),
name: fmt.Sprintf("profiler-test-node9-%s-gce", runID),
wantProfiles: []profileSummary{{"WALL", "busyLoop"}, {"HEAP", "benchmark"}},
nodeVersion: "9",
},
{
InstanceConfig: proftest.InstanceConfig{
ProjectID: projectID,
Zone: zone,
Name: fmt.Sprintf("profiler-test-node10-%d", runID),
Name: fmt.Sprintf("profiler-test-node10-%s", runID),
MachineType: "n1-standard-1",
},
name: fmt.Sprintf("profiler-test-node10-%d-gce", runID),
name: fmt.Sprintf("profiler-test-node10-%s-gce", runID),
wantProfiles: []profileSummary{{"WALL", "busyLoop"}, {"HEAP", "benchmark"}},
nodeVersion: "10",
},
Expand Down

0 comments on commit e0b5ecb

Please sign in to comment.