Skip to content

Commit

Permalink
update proxy SHA with mixer test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yangminzhu committed Sep 13, 2018
1 parent 1c17f06 commit 436738e
Show file tree
Hide file tree
Showing 16 changed files with 100 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion istio.deps
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"name": "PROXY_REPO_SHA",
"repoName": "proxy",
"file": "",
"lastStableSHA": "a35b8f44b78439c3beeb2d3e805ab6b991d14f24"
"lastStableSHA": "f49833732cab7e6f249760d1ec9d3ec19d19fe2c"
}
]
9 changes: 9 additions & 0 deletions mixer/test/client/check_cache_hit/check_cache_hit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
// Check attributes from a good GET request
const checkAttributesOkGet = `
{
"context.reporter.uid" : "*",
"context.protocol": "http",
"mesh1.ip": "[1 1 1 1]",
"mesh2.ip": "[0 0 0 0 0 0 0 0 0 0 255 255 204 152 189 116]",
Expand All @@ -38,6 +39,8 @@ const checkAttributesOkGet = `
"request.url_path": "/echo",
"source.uid": "POD11",
"source.namespace": "XYZ11",
"destination.namespace" : "*",
"destination.uid" : "*",
"target.name": "target-name",
"target.user": "target-user",
"target.uid": "POD222",
Expand All @@ -59,6 +62,7 @@ const checkAttributesOkGet = `
// In reportAttributesOkGet[0], check.cache_hit and quota.cache_hit are false.
// In reportAttributesOkGet[1], check.cache_hit and quota.cache_hit are true.
var reportAttributesOkGet = [...]string{`{
"context.reporter.uid" : "*",
"context.protocol": "http",
"context.proxy_error_code": "-",
"mesh1.ip": "[1 1 1 1]",
Expand All @@ -75,6 +79,8 @@ var reportAttributesOkGet = [...]string{`{
"source.namespace": "XYZ11",
"destination.ip": "[127 0 0 1]",
"destination.port": "*",
"destination.namespace" : "*",
"destination.uid" : "*",
"target.name": "target-name",
"target.user": "target-user",
"target.uid": "POD222",
Expand Down Expand Up @@ -106,6 +112,7 @@ var reportAttributesOkGet = [...]string{`{
"request.total_size": 306
}`,
`{
"context.reporter.uid" : "*",
"context.protocol": "http",
"context.proxy_error_code": "-",
"mesh1.ip": "[1 1 1 1]",
Expand All @@ -122,6 +129,8 @@ var reportAttributesOkGet = [...]string{`{
"source.namespace": "XYZ11",
"destination.ip": "[127 0 0 1]",
"destination.port": "*",
"destination.namespace" : "*",
"destination.uid" : "*",
"target.name": "target-name",
"target.user": "target-user",
"target.uid": "POD222",
Expand Down
12 changes: 12 additions & 0 deletions mixer/test/client/check_report/check_report_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
// Check attributes from a good GET request
const checkAttributesOkGet = `
{
"context.reporter.uid" : "*",
"context.protocol": "http",
"mesh1.ip": "[1 1 1 1]",
"mesh2.ip": "[0 0 0 0 0 0 0 0 0 0 255 255 204 152 189 116]",
Expand All @@ -37,6 +38,8 @@ const checkAttributesOkGet = `
"request.url_path": "/echo",
"source.uid": "POD11",
"source.namespace": "XYZ11",
"destination.namespace" : "*",
"destination.uid" : "*",
"target.name": "target-name",
"target.user": "target-user",
"target.uid": "POD222",
Expand All @@ -57,6 +60,7 @@ const checkAttributesOkGet = `
// Report attributes from a good GET request
const reportAttributesOkGet = `
{
"context.reporter.uid" : "*",
"context.protocol": "http",
"context.proxy_error_code": "-",
"mesh1.ip": "[1 1 1 1]",
Expand All @@ -73,6 +77,8 @@ const reportAttributesOkGet = `
"source.namespace": "XYZ11",
"destination.ip": "[127 0 0 1]",
"destination.port": "*",
"destination.namespace" : "*",
"destination.uid" : "*",
"target.name": "target-name",
"target.user": "target-user",
"target.uid": "POD222",
Expand Down Expand Up @@ -108,6 +114,7 @@ const reportAttributesOkGet = `
// Check attributes from a good POST request
const checkAttributesOkPost = `
{
"context.reporter.uid" : "*",
"context.protocol": "http",
"mesh1.ip": "[1 1 1 1]",
"mesh2.ip": "[0 0 0 0 0 0 0 0 0 0 255 255 204 152 189 116]",
Expand All @@ -121,6 +128,8 @@ const checkAttributesOkPost = `
"request.url_path": "/echo",
"source.uid": "POD11",
"source.namespace": "XYZ11",
"destination.namespace" : "*",
"destination.uid" : "*",
"target.name": "target-name",
"target.user": "target-user",
"target.uid": "POD222",
Expand All @@ -141,6 +150,7 @@ const checkAttributesOkPost = `
// Report attributes from a good POST request
const reportAttributesOkPost = `
{
"context.reporter.uid" : "*",
"context.protocol": "http",
"context.proxy_error_code": "-",
"mesh1.ip": "[1 1 1 1]",
Expand All @@ -157,6 +167,8 @@ const reportAttributesOkPost = `
"source.namespace": "XYZ11",
"destination.ip": "[127 0 0 1]",
"destination.port": "*",
"destination.namespace" : "*",
"destination.uid" : "*",
"target.name": "target-name",
"target.user": "target-user",
"target.uid": "POD222",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
// Check attributes from a good POST request
const checkAttributesOkPost = `
{
"context.reporter.uid" : "*",
"context.protocol": "http",
"mesh1.ip": "[1 1 1 1]",
"mesh2.ip": "[0 0 0 0 0 0 0 0 0 0 255 255 204 152 189 116]",
Expand All @@ -40,6 +41,8 @@ const checkAttributesOkPost = `
"target.namespace": "XYZ222",
"connection.mtls": false,
"origin.ip": "[127 0 0 1]",
"destination.namespace" : "*",
"destination.uid" : "*",
"request.headers": {
":method": "POST",
":path": "/echo",
Expand All @@ -54,6 +57,7 @@ const checkAttributesOkPost = `
// Report attributes from a good POST request
const reportAttributesOkPost = `
{
"context.reporter.uid" : "*",
"context.protocol": "http",
"context.proxy_error_code": "-",
"mesh1.ip": "[1 1 1 1]",
Expand All @@ -67,6 +71,8 @@ const reportAttributesOkPost = `
"request.url_path": "/echo",
"destination.ip": "[127 0 0 1]",
"destination.port": "*",
"destination.namespace" : "*",
"destination.uid" : "*",
"target.name": "target-name",
"target.user": "target-user",
"target.uid": "POD222",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ import (
// Report attributes from a good POST request
const reportAttributesOkPostOpen = `
{
"context.reporter.uid": "*",
"destination.uid": "*",
"destination.namespace": "*",
"context.protocol": "tcp",
"context.time": "*",
"mesh1.ip": "[1 1 1 1]",
Expand All @@ -44,6 +47,9 @@ const reportAttributesOkPostOpen = `
`
const reportAttributesOkPostClose = `
{
"context.reporter.uid": "*",
"destination.uid": "*",
"destination.namespace": "*",
"context.protocol": "tcp",
"context.time": "*",
"mesh1.ip": "[1 1 1 1]",
Expand Down
2 changes: 2 additions & 0 deletions mixer/test/client/dynamic_attribute/dynamic_attribute_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,10 @@ static_resources:
const reportAttributesOkGet = `
{
"destination.uid": "pod1.ns2",
"destination.namespace" : "*",
"context.protocol": "http",
"context.proxy_error_code": "-",
"context.reporter.uid" : "*",
"mesh1.ip": "[1 1 1 1]",
"mesh2.ip": "[0 0 0 0 0 0 0 0 0 0 255 255 204 152 189 116]",
"request.host": "*",
Expand Down
3 changes: 3 additions & 0 deletions mixer/test/client/dynamic_listener/dynamic_listener_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ static_resources:
const checkAttributesOkGet = `
{
"connection.mtls": false,
"context.reporter.uid" : "*",
"destination.namespace" : "*",
"destination.uid" : "*",
"origin.ip": "[127 0 0 1]",
"context.protocol": "http",
"key": "count%s",
Expand Down
9 changes: 9 additions & 0 deletions mixer/test/client/failed_request/failed_request_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const (
// Check attributes from a fail GET request from mixer
const checkAttributesMixerFail = `
{
"context.reporter.uid" : "*",
"context.protocol": "http",
"mesh1.ip": "[1 1 1 1]",
"mesh2.ip": "[0 0 0 0 0 0 0 0 0 0 255 255 204 152 189 116]",
Expand All @@ -43,6 +44,8 @@ const checkAttributesMixerFail = `
"request.url_path": "/echo",
"source.uid": "POD11",
"source.namespace": "XYZ11",
"destination.namespace" : "*",
"destination.uid" : "*",
"target.name": "target-name",
"target.user": "target-user",
"target.uid": "POD222",
Expand All @@ -63,6 +66,7 @@ const checkAttributesMixerFail = `
// Report attributes from a fail GET request from mixer
const reportAttributesMixerFail = `
{
"context.reporter.uid" : "*",
"check.error_code": 16,
"check.error_message": "UNAUTHENTICATED:Unauthenticated by mixer.",
"context.protocol": "http",
Expand All @@ -79,6 +83,8 @@ const reportAttributesMixerFail = `
"request.url_path": "/echo",
"source.uid": "POD11",
"source.namespace": "XYZ11",
"destination.namespace" : "*",
"destination.uid" : "*",
"target.name": "target-name",
"target.user": "target-user",
"target.uid": "POD222",
Expand Down Expand Up @@ -115,6 +121,7 @@ const reportAttributesMixerFail = `
// Report attributes from a fail GET request from backend
const reportAttributesBackendFail = `
{
"context.reporter.uid" : "*",
"context.protocol": "http",
"context.proxy_error_code": "-",
"mesh1.ip": "[1 1 1 1]",
Expand All @@ -131,6 +138,8 @@ const reportAttributesBackendFail = `
"source.namespace": "XYZ11",
"destination.ip": "[127 0 0 1]",
"destination.port": "*",
"destination.namespace" : "*",
"destination.uid" : "*",
"target.name": "target-name",
"target.user": "target-user",
"target.uid": "POD222",
Expand Down
3 changes: 3 additions & 0 deletions mixer/test/client/fault_inject/fault_inject_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
// Report attributes from a fault inject GET request
const reportAttributes = `
{
"context.reporter.uid" : "*",
"context.protocol": "http",
"context.proxy_error_code": "FI",
"mesh1.ip": "[1 1 1 1]",
Expand All @@ -37,6 +38,8 @@ const reportAttributes = `
"request.scheme": "http",
"source.uid": "POD11",
"source.namespace": "XYZ11",
"destination.namespace" : "*",
"destination.uid" : "*",
"target.name": "target-name",
"target.user": "target-user",
"target.uid": "POD222",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ const secIstioAuthUserinfoHeaderValue = `{"aud":"aud1","exp":20000000000,` +
// Check attributes from a good GET request
var checkAttributesOkGet = `
{
"context.reporter.uid" : "*",
"context.protocol": "http",
"mesh1.ip": "[1 1 1 1]",
"mesh2.ip": "[0 0 0 0 0 0 0 0 0 0 255 255 204 152 189 116]",
Expand All @@ -60,6 +61,8 @@ var checkAttributesOkGet = `
"request.scheme": "http",
"source.uid": "POD11",
"source.namespace": "XYZ11",
"destination.namespace" : "*",
"destination.uid" : "*",
"target.name": "target-name",
"target.user": "target-user",
"target.uid": "POD222",
Expand Down Expand Up @@ -90,6 +93,7 @@ var checkAttributesOkGet = `
// Report attributes from a good GET request with Istio authn policy binding to origin
var reportAttributesOkGet = `
{
"context.reporter.uid" : "*",
"context.protocol": "http",
"context.proxy_error_code": "-",
"mesh1.ip": "[1 1 1 1]",
Expand All @@ -105,6 +109,8 @@ var reportAttributesOkGet = `
"source.namespace": "XYZ11",
"destination.ip": "[127 0 0 1]",
"destination.port": "*",
"destination.namespace" : "*",
"destination.uid" : "*",
"target.name": "target-name",
"target.user": "target-user",
"target.uid": "POD222",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const secIstioAuthUserinfoHeaderValue = `{"aud":"aud1","exp":20000000000,` +
// Check attributes from a good GET request
var checkAttributesOkGet = `
{
"context.reporter.uid" : "*",
"context.protocol": "http",
"mesh1.ip": "[1 1 1 1]",
"mesh2.ip": "[0 0 0 0 0 0 0 0 0 0 255 255 204 152 189 116]",
Expand All @@ -59,6 +60,8 @@ var checkAttributesOkGet = `
"request.scheme": "http",
"source.uid": "POD11",
"source.namespace": "XYZ11",
"destination.namespace" : "*",
"destination.uid" : "*",
"target.name": "target-name",
"target.user": "target-user",
"target.uid": "POD222",
Expand Down Expand Up @@ -88,6 +91,7 @@ var checkAttributesOkGet = `
// Report attributes from a good GET request
var reportAttributesOkGet = `
{
"context.reporter.uid" : "*",
"context.protocol": "http",
"context.proxy_error_code": "-",
"mesh1.ip": "[1 1 1 1]",
Expand All @@ -103,6 +107,8 @@ var reportAttributesOkGet = `
"source.namespace": "XYZ11",
"destination.ip": "[127 0 0 1]",
"destination.port": "*",
"destination.namespace" : "*",
"destination.uid" : "*",
"target.name": "target-name",
"target.user": "target-user",
"target.uid": "POD222",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ const secIstioAuthUserinfoHeaderValue = `{"aud":"aud1","exp":20000000000,` +
// Check attributes from a good GET request
var checkAttributesOkGet = `
{
"context.reporter.uid" : "*",
"context.protocol": "http",
"mesh1.ip": "[1 1 1 1]",
"mesh2.ip": "[0 0 0 0 0 0 0 0 0 0 255 255 204 152 189 116]",
Expand All @@ -62,6 +63,8 @@ var checkAttributesOkGet = `
"source.namespace": "XYZ11",
"source.principal": "issuer@foo.com/sub@foo.com",
"source.user": "issuer@foo.com/sub@foo.com",
"destination.namespace" : "*",
"destination.uid" : "*",
"target.name": "target-name",
"target.user": "target-user",
"target.uid": "POD222",
Expand Down Expand Up @@ -92,6 +95,7 @@ var checkAttributesOkGet = `
// Report attributes from a good GET request with Istio authn policy
var reportAttributesOkGet = `
{
"context.reporter.uid" : "*",
"context.protocol": "http",
"context.proxy_error_code": "-",
"mesh1.ip": "[1 1 1 1]",
Expand All @@ -109,6 +113,8 @@ var reportAttributesOkGet = `
"source.user": "issuer@foo.com/sub@foo.com",
"destination.ip": "[127 0 0 1]",
"destination.port": "*",
"destination.namespace" : "*",
"destination.uid" : "*",
"target.name": "target-name",
"target.user": "target-user",
"target.uid": "POD222",
Expand Down
Loading

0 comments on commit 436738e

Please sign in to comment.