test/api: basic C++ build/link test, minor RLDS fix. (#90)
This is useful in Travis CI (and also internally at Google in our CI) to validate basic build/link of the protos. This exposed a small issue with API compatibility. Since we don't have additional package namespaces for each individual API, there was a conflict between the RateLimit mesage in RLDS and RDS. The quick fix was to move the RLDS message inside the response object (this is fine as nobody is using the v2 RLDS yet, open to alternatives including per-xDS API namespaces).pull/96/head
parent
7f9195fe5e
commit
1b4ac577d1
5 changed files with 46 additions and 17 deletions
@ -0,0 +1,12 @@ |
||||
cc_test( |
||||
name = "build_test", |
||||
srcs = ["build_test.cc"], |
||||
deps = [ |
||||
"//api:cds", |
||||
"//api:eds", |
||||
"//api:hds", |
||||
"//api:lds", |
||||
"//api:rlds", |
||||
"//api:rds", |
||||
], |
||||
) |
@ -0,0 +1,16 @@ |
||||
#include "api/cds.pb.h" |
||||
#include "api/eds.pb.h" |
||||
#include "api/hds.pb.h" |
||||
#include "api/lds.pb.h" |
||||
#include "api/rlds.pb.h" |
||||
#include "api/rds.pb.h" |
||||
|
||||
// Basic C++ build/link validation for the v2 xDS APIs.
|
||||
int main(int argc, char *argv[]) { |
||||
envoy::api::v2::ClusterDiscoveryService::descriptor(); |
||||
envoy::api::v2::EndpointDiscoveryService::descriptor(); |
||||
envoy::api::v2::HealthDiscoveryService::descriptor(); |
||||
envoy::api::v2::ListenerDiscoveryService::descriptor(); |
||||
envoy::api::v2::RateLimitDiscoveryService::descriptor(); |
||||
envoy::api::v2::RouteDiscoveryService::descriptor(); |
||||
} |
Loading…
Reference in new issue