1- // Copyright 2021 Google LLC
1+ // Copyright 2022 Google LLC
22//
33// Licensed under the Apache License, Version 2.0 (the "License");
44// you may not use this file except in compliance with the License.
@@ -17,9 +17,9 @@ syntax = "proto3";
1717package google.example.showcase.v1beta2 ;
1818
1919import "google/api/annotations.proto" ;
20+ import "google/api/client.proto" ;
2021import "google/api/resource.proto" ;
2122import "google/protobuf/empty.proto" ;
22- import "google/api/client.proto" ;
2323
2424option go_package = "github.com/googleapis/gapic-showcase/server/genproto" ;
2525option java_multiple_files = true ;
@@ -212,6 +212,33 @@ message Test {
212212 pattern : "sessions/{session}/tests/{test}"
213213 };
214214
215+ // Whether or not a test is required, recommended, or optional.
216+ enum ExpectationLevel {
217+ EXPECTATION_LEVEL_UNSPECIFIED = 0 ;
218+
219+ // This test is strictly required.
220+ REQUIRED = 1 ;
221+
222+ // This test is recommended.
223+ //
224+ // If a generator explicitly ignores a recommended test (see `DeleteTest`),
225+ // then the report may still pass, but with a warning.
226+ //
227+ // If a generator skips a recommended test and does not explicitly
228+ // express that intention, the report will fail.
229+ RECOMMENDED = 2 ;
230+
231+ // This test is optional.
232+ //
233+ // If a generator explicitly ignores an optional test (see `DeleteTest`),
234+ // then the report may still pass, and no warning will be issued.
235+ //
236+ // If a generator skips an optional test and does not explicitly
237+ // express that intention, the report may still pass, but with a
238+ // warning.
239+ OPTIONAL = 3 ;
240+ }
241+
215242 // A blueprint is an explicit definition of methods and requests that are
216243 // needed to be made to test this specific test case. Ideally this would be
217244 // represented by something more robust like CEL, but as of writing this, I am
@@ -244,33 +271,6 @@ message Test {
244271 repeated Invocation additional_requests = 4 ;
245272 }
246273
247- // Whether or not a test is required, recommended, or optional.
248- enum ExpectationLevel {
249- EXPECTATION_LEVEL_UNSPECIFIED = 0 ;
250-
251- // This test is strictly required.
252- REQUIRED = 1 ;
253-
254- // This test is recommended.
255- //
256- // If a generator explicitly ignores a recommended test (see `DeleteTest`),
257- // then the report may still pass, but with a warning.
258- //
259- // If a generator skips a recommended test and does not explicitly
260- // express that intention, the report will fail.
261- RECOMMENDED = 2 ;
262-
263- // This test is optional.
264- //
265- // If a generator explicitly ignores an optional test (see `DeleteTest`),
266- // then the report may still pass, and no warning will be issued.
267- //
268- // If a generator skips an optional test and does not explicitly
269- // express that intention, the report may still pass, but with a
270- // warning.
271- OPTIONAL = 3 ;
272- }
273-
274274 // The name of the test.
275275 // The tests/* portion of the names are hard-coded, and do not change
276276 // from session to session.
0 commit comments