test: Specify test plan name pattern
BUG=chromium:1063474
TEST=./generate.sh
Change-Id: Ic3550f13146e03b6ea48159c876ef466755d0c55
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/infra/proto/+/2120289
Commit-Queue: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: Alex Zamorzaev <zamorzaev@chromium.org>
diff --git a/go/test/plan/v1/plan.pb.go b/go/test/plan/v1/plan.pb.go
index 9f1eb17..141eeb8 100644
--- a/go/test/plan/v1/plan.pb.go
+++ b/go/test/plan/v1/plan.pb.go
@@ -33,6 +33,8 @@
// A globally unique test plan name.
//
// Must be valid resource name per https://aip.dev/122.
+ //
+ // Pattern: plans/{plan}
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Each test plan unit specifies a particular set of tests to be run to meet
// specific conditions.
@@ -83,9 +85,12 @@
// Specifies a particular set of tests to be run to meet specific conditions.
type Unit struct {
- // A test plan unit name, unique within a plan.
+ // A globally unique test plan unit name.
//
// Must be valid resource name per https://aip.dev/122.
+ //
+ // Pattern: plans/{plan}/units/{unit}
+ // where {plan} is the parent Plan of this Unit.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Selects tests to include in this test plan unit.
TestCondition *TestCondition `protobuf:"bytes,2,opt,name=test_condition,json=testCondition,proto3" json:"test_condition,omitempty"`
diff --git a/src/test/plan/v1/plan.proto b/src/test/plan/v1/plan.proto
index 89b3d2b..8f77d89 100644
--- a/src/test/plan/v1/plan.proto
+++ b/src/test/plan/v1/plan.proto
@@ -25,6 +25,8 @@
// A globally unique test plan name.
//
// Must be valid resource name per https://aip.dev/122.
+ //
+ // Pattern: plans/{plan}
string name = 1;
// Each test plan unit specifies a particular set of tests to be run to meet
@@ -34,9 +36,12 @@
// Specifies a particular set of tests to be run to meet specific conditions.
message Unit {
- // A test plan unit name, unique within a plan.
+ // A globally unique test plan unit name.
//
// Must be valid resource name per https://aip.dev/122.
+ //
+ // Pattern: plans/{plan}/units/{unit}
+ // where {plan} is the parent Plan of this Unit.
string name = 1;
// Selects tests to include in this test plan unit.