Skip to content

Commit

Permalink
Cleanup the PR
Browse files Browse the repository at this point in the history
  • Loading branch information
wanlin31 committed Feb 5, 2022
1 parent e674fb6 commit 22dcacc
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 21 deletions.
12 changes: 6 additions & 6 deletions api/v1/loadtest_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ type Driver struct {
// +optional
Build *Build `json:"build,omitempty"`

// Run describes a list of run container, where the first container is the
// runtime of the driver for the actual test.
// Run describes a list of run containers. The container for the test driver is always
// the first container on the list.
Run []corev1.Container `json:"run"`
}

Expand Down Expand Up @@ -178,8 +178,8 @@ type Server struct {
// +optional
Build *Build `json:"build,omitempty"`

// Run describes a list of run containers, which is the runtime of the server for
// the actual test.
// Run describes a list of run containers. The container for the test server is always
// the first container on the list.
Run []corev1.Container `json:"run"`
}

Expand Down Expand Up @@ -232,8 +232,8 @@ type Client struct {
// +optional
Build *Build `json:"build,omitempty"`

// Run describes a list of run container, , which is the runtime of the client for
// the actual test.
// Run describes a list of run containers. The container for the test client is always
// the first container on the list.
Run []corev1.Container `json:"run"`
}

Expand Down
6 changes: 1 addition & 5 deletions config/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const (
// RunContainerName holds the name of the main container where the test is
// executed. The runtime for the test may contain multiple run containers.
// The main container is always the first container on the list.
RunContainerName = "run"
RunContainerName = "main"

// ScenariosFileEnv specifies the name of an env variable that specifies the
// path to a JSON file with scenarios.
Expand All @@ -123,10 +123,6 @@ const (
// the init containers and containers for a driver or worker pod.
WorkspaceVolumeName = "workspace"

// WorkerContainerName holds the name of the worker container where the test is
// executed.
WorkerContainerName = "worker"

// KillAfterEnv specifies the name of the env variable that sets the allowed response time for a pod after timeout.
KillAfterEnv = "KILL_AFTER"

Expand Down
13 changes: 6 additions & 7 deletions config/crd/bases/e2etest.grpc.io_loadtests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,8 @@ spec:
will choose a pool based on defaults.
type: string
run:
description: Run describes a list of run container, , which
is the runtime of the client for the actual test.
description: Run describes a list of run containers. The container
for the test client is always the first container on the list.
items:
description: A single application container that you want
to run within a pod.
Expand Down Expand Up @@ -1579,9 +1579,8 @@ spec:
choose a pool based on defaults.
type: string
run:
description: Run describes a list of run container, where the
first container is the runtime of the driver for the actual
test.
description: Run describes a list of run containers. The container
for the test driver is always the first container on the list.
items:
description: A single application container that you want to
run within a pod.
Expand Down Expand Up @@ -2910,8 +2909,8 @@ spec:
will choose a pool based on defaults.
type: string
run:
description: Run describes a list of run containers, which is
the runtime of the server for the actual test.
description: Run describes a list of run containers. The container
for the test server is always the first container on the list.
items:
description: A single application container that you want
to run within a pod.
Expand Down
4 changes: 2 additions & 2 deletions config/samples/go_example_loadtest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
language: go
name: '0'
run:
- name: "run"
- name: "main"
args:
- -c
- |
Expand Down Expand Up @@ -118,7 +118,7 @@ spec:
language: go
name: '0'
run:
- name: "run"
- name: "main"
args:
- -c
- |
Expand Down
3 changes: 2 additions & 1 deletion containers/init/ready/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
. "github.com/onsi/gomega"

grpcv1 "github.com/grpc/test-infra/api/v1"
"github.com/grpc/test-infra/config"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
Expand Down Expand Up @@ -54,7 +55,7 @@ func newTestPod(role string) corev1.Pod {
Spec: corev1.PodSpec{
Containers: []corev1.Container{
{
Name: "run",
Name: config.RunContainerName,
Ports: []corev1.ContainerPort{
{
Name: "driver",
Expand Down

0 comments on commit 22dcacc

Please sign in to comment.