Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Charly Molter <charly.molter@konghq.com>
  • Loading branch information
lahabana committed Aug 24, 2021
1 parent 5792133 commit cb701ff
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ var _ = Describe("HttpAccessLogConfigurer", func() {
textFormatSource:
inlineString: |+
[%START_TIME%] demo "%REQ(:method)% %REQ(x-envoy-original-path?:path)% %PROTOCOL%" %RESPONSE_CODE% %RESPONSE_FLAGS% %BYTES_RECEIVED% %BYTES_SENT% %DURATION% %RESP(x-envoy-upstream-service-time)% "%REQ(x-forwarded-for)%" "%REQ(user-agent)%" "%REQ(x-request-id)%" "%REQ(:authority)%" "web" "backend" "192.168.0.1" "%UPSTREAM_HOST%"
path: /tmp/log
httpFilters:
- name: envoy.filters.http.router
Expand All @@ -142,7 +141,6 @@ var _ = Describe("HttpAccessLogConfigurer", func() {
backend: &mesh_proto.LoggingBackend{
Name: "tcp",
Format: `[%START_TIME%] "%REQ(X-REQUEST-ID)%" "%REQ(:AUTHORITY)%" "%REQ(ORIGIN)%" "%REQ(CONTENT-TYPE)%" "%KUMA_SOURCE_SERVICE%" "%KUMA_DESTINATION_SERVICE%" "%KUMA_SOURCE_ADDRESS%" "%KUMA_SOURCE_ADDRESS_WITHOUT_PORT%" "%UPSTREAM_HOST%"
"%RESP(SERVER):5%" "%TRAILER(GRPC-MESSAGE):7%" "DYNAMIC_METADATA(namespace:object:key):9" "FILTER_STATE(filter.state.key):12"
`, // intentional newline at the end
Type: mesh_proto.LoggingTcpType,
Expand Down Expand Up @@ -177,9 +175,8 @@ var _ = Describe("HttpAccessLogConfigurer", func() {
clusterName: access_log_sink
logName: |+
127.0.0.1:1234;[%START_TIME%] "%REQ(x-request-id)%" "%REQ(:authority)%" "%REQ(origin)%" "%REQ(content-type)%" "web" "backend" "192.168.0.1:0" "192.168.0.1" "%UPSTREAM_HOST%"
"%RESP(server):5%" "%TRAILER(grpc-message):7%" "DYNAMIC_METADATA(namespace:object:key):9" "FILTER_STATE(filter.state.key):12"
transportApiVersion: V3
httpFilters:
- name: envoy.filters.http.router
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ var _ = Describe("NetworkAccessLogConfigurer", func() {
textFormatSource:
inlineString: |+
[%START_TIME%] %RESPONSE_FLAGS% demo 192.168.0.1(backend)->%UPSTREAM_HOST%(db) took %DURATION%ms, sent %BYTES_SENT% bytes, received: %BYTES_RECEIVED% bytes
path: /tmp/log
cluster: db
statPrefix: db
Expand All @@ -149,7 +148,6 @@ var _ = Describe("NetworkAccessLogConfigurer", func() {
backend: &mesh_proto.LoggingBackend{
Name: "tcp",
Format: `[%START_TIME%] "%REQ(X-REQUEST-ID)%" "%REQ(:AUTHORITY)%" "%REQ(ORIGIN)%" "%REQ(CONTENT-TYPE)%" "%KUMA_SOURCE_SERVICE%" "%KUMA_DESTINATION_SERVICE%" "%KUMA_SOURCE_ADDRESS%" "%KUMA_SOURCE_ADDRESS_WITHOUT_PORT%" "%UPSTREAM_HOST%
"%RESP(SERVER):5%" "%TRAILER(GRPC-MESSAGE):7%" "DYNAMIC_METADATA(namespace:object:key):9" "FILTER_STATE(filter.state.key):12"
`, // intentional newline at the end
Type: mesh_proto.LoggingTcpType,
Expand Down Expand Up @@ -184,9 +182,8 @@ var _ = Describe("NetworkAccessLogConfigurer", func() {
clusterName: access_log_sink
logName: |+
127.0.0.1:1234;[%START_TIME%] "%REQ(x-request-id)%" "%REQ(:authority)%" "%REQ(origin)%" "%REQ(content-type)%" "backend" "db" "192.168.0.1:0" "192.168.0.1" "%UPSTREAM_HOST%
"%RESP(server):5%" "%TRAILER(grpc-message):7%" "DYNAMIC_METADATA(namespace:object:key):9" "FILTER_STATE(filter.state.key):12"
transportApiVersion: V3
cluster: db
statPrefix: db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,8 @@ resources:
'@type': type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog
logFormat:
textFormatSource:
inlineString: |+
inlineString: |
[%START_TIME%] mesh1 "%REQ(:method)% %REQ(x-envoy-original-path?:path)% %PROTOCOL%" %RESPONSE_CODE% %RESPONSE_FLAGS% %BYTES_RECEIVED% %BYTES_SENT% %DURATION% %RESP(x-envoy-upstream-service-time)% "%REQ(x-forwarded-for)%" "%REQ(user-agent)%" "%REQ(x-request-id)%" "%REQ(:authority)%" "gateway" "api-http" "10.0.0.1" "%UPSTREAM_HOST%"
path: /var/log
httpFilters:
- name: envoy.filters.http.router
Expand Down Expand Up @@ -366,9 +365,8 @@ resources:
grpcService:
envoyGrpc:
clusterName: access_log_sink
logName: |+
logName: |
logstash:1234;[%START_TIME%] %RESPONSE_FLAGS% mesh1 10.0.0.1(gateway)->%UPSTREAM_HOST%(api-tcp) took %DURATION%ms, sent %BYTES_SENT% bytes, received: %BYTES_RECEIVED% bytes
transportApiVersion: V3
cluster: api-tcp
statPrefix: api-tcp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,8 @@ resources:
'@type': type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog
logFormat:
textFormatSource:
inlineString: |+
inlineString: |
[%START_TIME%] mesh1 "%REQ(:method)% %REQ(x-envoy-original-path?:path)% %PROTOCOL%" %RESPONSE_CODE% %RESPONSE_FLAGS% %BYTES_RECEIVED% %BYTES_SENT% %DURATION% %RESP(x-envoy-upstream-service-time)% "%REQ(x-forwarded-for)%" "%REQ(user-agent)%" "%REQ(x-request-id)%" "%REQ(:authority)%" "web" "api-http" "10.0.0.1" "%UPSTREAM_HOST%"
path: /var/log
httpFilters:
- name: envoy.filters.http.router
Expand Down Expand Up @@ -405,9 +404,8 @@ resources:
grpcService:
envoyGrpc:
clusterName: access_log_sink
logName: |+
logName: |
logstash:1234;[%START_TIME%] %RESPONSE_FLAGS% mesh1 10.0.0.1(web)->%UPSTREAM_HOST%(api-tcp) took %DURATION%ms, sent %BYTES_SENT% bytes, received: %BYTES_RECEIVED% bytes
transportApiVersion: V3
cluster: api-tcp
statPrefix: api-tcp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ resources:
'@type': type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog
logFormat:
textFormatSource:
inlineString: |+
inlineString: |
[%START_TIME%] %RESPONSE_FLAGS% default (unknown)->%UPSTREAM_HOST%(external) took %DURATION%ms, sent %BYTES_SENT% bytes, received: %BYTES_RECEIVED% bytes
path: /var/log
cluster: outbound:passthrough:ipv4
statPrefix: outbound_passthrough_ipv4
Expand Down

0 comments on commit cb701ff

Please sign in to comment.