|
|
|
|
@@ -178,11 +178,12 @@ func TestEventf(t *testing.T) {
|
|
|
|
|
APIVersion: "v1",
|
|
|
|
|
FieldPath: "spec.containers[2]",
|
|
|
|
|
},
|
|
|
|
|
Reason: "Started",
|
|
|
|
|
Message: "some verbose message: 1",
|
|
|
|
|
Source: v1.EventSource{Component: "eventTest"},
|
|
|
|
|
Count: 1,
|
|
|
|
|
Type: v1.EventTypeNormal,
|
|
|
|
|
Reason: "Started",
|
|
|
|
|
Message: "some verbose message: 1",
|
|
|
|
|
Source: v1.EventSource{Component: "eventTest"},
|
|
|
|
|
ReportingController: "eventTest",
|
|
|
|
|
Count: 1,
|
|
|
|
|
Type: v1.EventTypeNormal,
|
|
|
|
|
},
|
|
|
|
|
expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"bar", APIVersion:"v1", ResourceVersion:"", FieldPath:"spec.containers[2]"}): type: 'Normal' reason: 'Started' some verbose message: 1`,
|
|
|
|
|
expectUpdate: false,
|
|
|
|
|
@@ -205,11 +206,12 @@ func TestEventf(t *testing.T) {
|
|
|
|
|
UID: "bar",
|
|
|
|
|
APIVersion: "v1",
|
|
|
|
|
},
|
|
|
|
|
Reason: "Killed",
|
|
|
|
|
Message: "some other verbose message: 1",
|
|
|
|
|
Source: v1.EventSource{Component: "eventTest"},
|
|
|
|
|
Count: 1,
|
|
|
|
|
Type: v1.EventTypeNormal,
|
|
|
|
|
Reason: "Killed",
|
|
|
|
|
Message: "some other verbose message: 1",
|
|
|
|
|
Source: v1.EventSource{Component: "eventTest"},
|
|
|
|
|
ReportingController: "eventTest",
|
|
|
|
|
Count: 1,
|
|
|
|
|
Type: v1.EventTypeNormal,
|
|
|
|
|
},
|
|
|
|
|
expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"bar", APIVersion:"v1", ResourceVersion:"", FieldPath:""}): type: 'Normal' reason: 'Killed' some other verbose message: 1`,
|
|
|
|
|
expectUpdate: false,
|
|
|
|
|
@@ -233,11 +235,12 @@ func TestEventf(t *testing.T) {
|
|
|
|
|
APIVersion: "v1",
|
|
|
|
|
FieldPath: "spec.containers[2]",
|
|
|
|
|
},
|
|
|
|
|
Reason: "Started",
|
|
|
|
|
Message: "some verbose message: 1",
|
|
|
|
|
Source: v1.EventSource{Component: "eventTest"},
|
|
|
|
|
Count: 2,
|
|
|
|
|
Type: v1.EventTypeNormal,
|
|
|
|
|
Reason: "Started",
|
|
|
|
|
Message: "some verbose message: 1",
|
|
|
|
|
Source: v1.EventSource{Component: "eventTest"},
|
|
|
|
|
ReportingController: "eventTest",
|
|
|
|
|
Count: 2,
|
|
|
|
|
Type: v1.EventTypeNormal,
|
|
|
|
|
},
|
|
|
|
|
expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"bar", APIVersion:"v1", ResourceVersion:"", FieldPath:"spec.containers[2]"}): type: 'Normal' reason: 'Started' some verbose message: 1`,
|
|
|
|
|
expectUpdate: true,
|
|
|
|
|
@@ -261,11 +264,12 @@ func TestEventf(t *testing.T) {
|
|
|
|
|
APIVersion: "v1",
|
|
|
|
|
FieldPath: "spec.containers[3]",
|
|
|
|
|
},
|
|
|
|
|
Reason: "Started",
|
|
|
|
|
Message: "some verbose message: 1",
|
|
|
|
|
Source: v1.EventSource{Component: "eventTest"},
|
|
|
|
|
Count: 1,
|
|
|
|
|
Type: v1.EventTypeNormal,
|
|
|
|
|
Reason: "Started",
|
|
|
|
|
Message: "some verbose message: 1",
|
|
|
|
|
Source: v1.EventSource{Component: "eventTest"},
|
|
|
|
|
ReportingController: "eventTest",
|
|
|
|
|
Count: 1,
|
|
|
|
|
Type: v1.EventTypeNormal,
|
|
|
|
|
},
|
|
|
|
|
expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"differentUid", APIVersion:"v1", ResourceVersion:"", FieldPath:"spec.containers[3]"}): type: 'Normal' reason: 'Started' some verbose message: 1`,
|
|
|
|
|
expectUpdate: false,
|
|
|
|
|
@@ -289,11 +293,12 @@ func TestEventf(t *testing.T) {
|
|
|
|
|
APIVersion: "v1",
|
|
|
|
|
FieldPath: "spec.containers[2]",
|
|
|
|
|
},
|
|
|
|
|
Reason: "Started",
|
|
|
|
|
Message: "some verbose message: 1",
|
|
|
|
|
Source: v1.EventSource{Component: "eventTest"},
|
|
|
|
|
Count: 3,
|
|
|
|
|
Type: v1.EventTypeNormal,
|
|
|
|
|
Reason: "Started",
|
|
|
|
|
Message: "some verbose message: 1",
|
|
|
|
|
Source: v1.EventSource{Component: "eventTest"},
|
|
|
|
|
ReportingController: "eventTest",
|
|
|
|
|
Count: 3,
|
|
|
|
|
Type: v1.EventTypeNormal,
|
|
|
|
|
},
|
|
|
|
|
expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"bar", APIVersion:"v1", ResourceVersion:"", FieldPath:"spec.containers[2]"}): type: 'Normal' reason: 'Started' some verbose message: 1`,
|
|
|
|
|
expectUpdate: true,
|
|
|
|
|
@@ -317,11 +322,12 @@ func TestEventf(t *testing.T) {
|
|
|
|
|
APIVersion: "v1",
|
|
|
|
|
FieldPath: "spec.containers[3]",
|
|
|
|
|
},
|
|
|
|
|
Reason: "Stopped",
|
|
|
|
|
Message: "some verbose message: 1",
|
|
|
|
|
Source: v1.EventSource{Component: "eventTest"},
|
|
|
|
|
Count: 1,
|
|
|
|
|
Type: v1.EventTypeNormal,
|
|
|
|
|
Reason: "Stopped",
|
|
|
|
|
Message: "some verbose message: 1",
|
|
|
|
|
Source: v1.EventSource{Component: "eventTest"},
|
|
|
|
|
ReportingController: "eventTest",
|
|
|
|
|
Count: 1,
|
|
|
|
|
Type: v1.EventTypeNormal,
|
|
|
|
|
},
|
|
|
|
|
expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"differentUid", APIVersion:"v1", ResourceVersion:"", FieldPath:"spec.containers[3]"}): type: 'Normal' reason: 'Stopped' some verbose message: 1`,
|
|
|
|
|
expectUpdate: false,
|
|
|
|
|
@@ -345,11 +351,12 @@ func TestEventf(t *testing.T) {
|
|
|
|
|
APIVersion: "v1",
|
|
|
|
|
FieldPath: "spec.containers[3]",
|
|
|
|
|
},
|
|
|
|
|
Reason: "Stopped",
|
|
|
|
|
Message: "some verbose message: 1",
|
|
|
|
|
Source: v1.EventSource{Component: "eventTest"},
|
|
|
|
|
Count: 2,
|
|
|
|
|
Type: v1.EventTypeNormal,
|
|
|
|
|
Reason: "Stopped",
|
|
|
|
|
Message: "some verbose message: 1",
|
|
|
|
|
Source: v1.EventSource{Component: "eventTest"},
|
|
|
|
|
ReportingController: "eventTest",
|
|
|
|
|
Count: 2,
|
|
|
|
|
Type: v1.EventTypeNormal,
|
|
|
|
|
},
|
|
|
|
|
expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"differentUid", APIVersion:"v1", ResourceVersion:"", FieldPath:"spec.containers[3]"}): type: 'Normal' reason: 'Stopped' some verbose message: 1`,
|
|
|
|
|
expectUpdate: true,
|
|
|
|
|
@@ -697,11 +704,12 @@ func TestMultiSinkCache(t *testing.T) {
|
|
|
|
|
APIVersion: "v1",
|
|
|
|
|
FieldPath: "spec.containers[2]",
|
|
|
|
|
},
|
|
|
|
|
Reason: "Started",
|
|
|
|
|
Message: "some verbose message: 1",
|
|
|
|
|
Source: v1.EventSource{Component: "eventTest"},
|
|
|
|
|
Count: 1,
|
|
|
|
|
Type: v1.EventTypeNormal,
|
|
|
|
|
Reason: "Started",
|
|
|
|
|
Message: "some verbose message: 1",
|
|
|
|
|
Source: v1.EventSource{Component: "eventTest"},
|
|
|
|
|
ReportingController: "eventTest",
|
|
|
|
|
Count: 1,
|
|
|
|
|
Type: v1.EventTypeNormal,
|
|
|
|
|
},
|
|
|
|
|
expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"bar", APIVersion:"v1", ResourceVersion:"", FieldPath:"spec.containers[2]"}): type: 'Normal' reason: 'Started' some verbose message: 1`,
|
|
|
|
|
expectUpdate: false,
|
|
|
|
|
@@ -724,11 +732,12 @@ func TestMultiSinkCache(t *testing.T) {
|
|
|
|
|
UID: "bar",
|
|
|
|
|
APIVersion: "v1",
|
|
|
|
|
},
|
|
|
|
|
Reason: "Killed",
|
|
|
|
|
Message: "some other verbose message: 1",
|
|
|
|
|
Source: v1.EventSource{Component: "eventTest"},
|
|
|
|
|
Count: 1,
|
|
|
|
|
Type: v1.EventTypeNormal,
|
|
|
|
|
Reason: "Killed",
|
|
|
|
|
Message: "some other verbose message: 1",
|
|
|
|
|
Source: v1.EventSource{Component: "eventTest"},
|
|
|
|
|
ReportingController: "eventTest",
|
|
|
|
|
Count: 1,
|
|
|
|
|
Type: v1.EventTypeNormal,
|
|
|
|
|
},
|
|
|
|
|
expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"bar", APIVersion:"v1", ResourceVersion:"", FieldPath:""}): type: 'Normal' reason: 'Killed' some other verbose message: 1`,
|
|
|
|
|
expectUpdate: false,
|
|
|
|
|
@@ -752,11 +761,12 @@ func TestMultiSinkCache(t *testing.T) {
|
|
|
|
|
APIVersion: "v1",
|
|
|
|
|
FieldPath: "spec.containers[2]",
|
|
|
|
|
},
|
|
|
|
|
Reason: "Started",
|
|
|
|
|
Message: "some verbose message: 1",
|
|
|
|
|
Source: v1.EventSource{Component: "eventTest"},
|
|
|
|
|
Count: 2,
|
|
|
|
|
Type: v1.EventTypeNormal,
|
|
|
|
|
Reason: "Started",
|
|
|
|
|
Message: "some verbose message: 1",
|
|
|
|
|
Source: v1.EventSource{Component: "eventTest"},
|
|
|
|
|
ReportingController: "eventTest",
|
|
|
|
|
Count: 2,
|
|
|
|
|
Type: v1.EventTypeNormal,
|
|
|
|
|
},
|
|
|
|
|
expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"bar", APIVersion:"v1", ResourceVersion:"", FieldPath:"spec.containers[2]"}): type: 'Normal' reason: 'Started' some verbose message: 1`,
|
|
|
|
|
expectUpdate: true,
|
|
|
|
|
@@ -780,11 +790,12 @@ func TestMultiSinkCache(t *testing.T) {
|
|
|
|
|
APIVersion: "v1",
|
|
|
|
|
FieldPath: "spec.containers[3]",
|
|
|
|
|
},
|
|
|
|
|
Reason: "Started",
|
|
|
|
|
Message: "some verbose message: 1",
|
|
|
|
|
Source: v1.EventSource{Component: "eventTest"},
|
|
|
|
|
Count: 1,
|
|
|
|
|
Type: v1.EventTypeNormal,
|
|
|
|
|
Reason: "Started",
|
|
|
|
|
Message: "some verbose message: 1",
|
|
|
|
|
Source: v1.EventSource{Component: "eventTest"},
|
|
|
|
|
ReportingController: "eventTest",
|
|
|
|
|
Count: 1,
|
|
|
|
|
Type: v1.EventTypeNormal,
|
|
|
|
|
},
|
|
|
|
|
expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"differentUid", APIVersion:"v1", ResourceVersion:"", FieldPath:"spec.containers[3]"}): type: 'Normal' reason: 'Started' some verbose message: 1`,
|
|
|
|
|
expectUpdate: false,
|
|
|
|
|
@@ -808,11 +819,12 @@ func TestMultiSinkCache(t *testing.T) {
|
|
|
|
|
APIVersion: "v1",
|
|
|
|
|
FieldPath: "spec.containers[2]",
|
|
|
|
|
},
|
|
|
|
|
Reason: "Started",
|
|
|
|
|
Message: "some verbose message: 1",
|
|
|
|
|
Source: v1.EventSource{Component: "eventTest"},
|
|
|
|
|
Count: 3,
|
|
|
|
|
Type: v1.EventTypeNormal,
|
|
|
|
|
Reason: "Started",
|
|
|
|
|
Message: "some verbose message: 1",
|
|
|
|
|
Source: v1.EventSource{Component: "eventTest"},
|
|
|
|
|
ReportingController: "eventTest",
|
|
|
|
|
Count: 3,
|
|
|
|
|
Type: v1.EventTypeNormal,
|
|
|
|
|
},
|
|
|
|
|
expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"bar", APIVersion:"v1", ResourceVersion:"", FieldPath:"spec.containers[2]"}): type: 'Normal' reason: 'Started' some verbose message: 1`,
|
|
|
|
|
expectUpdate: true,
|
|
|
|
|
@@ -836,11 +848,12 @@ func TestMultiSinkCache(t *testing.T) {
|
|
|
|
|
APIVersion: "v1",
|
|
|
|
|
FieldPath: "spec.containers[3]",
|
|
|
|
|
},
|
|
|
|
|
Reason: "Stopped",
|
|
|
|
|
Message: "some verbose message: 1",
|
|
|
|
|
Source: v1.EventSource{Component: "eventTest"},
|
|
|
|
|
Count: 1,
|
|
|
|
|
Type: v1.EventTypeNormal,
|
|
|
|
|
Reason: "Stopped",
|
|
|
|
|
Message: "some verbose message: 1",
|
|
|
|
|
Source: v1.EventSource{Component: "eventTest"},
|
|
|
|
|
ReportingController: "eventTest",
|
|
|
|
|
Count: 1,
|
|
|
|
|
Type: v1.EventTypeNormal,
|
|
|
|
|
},
|
|
|
|
|
expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"differentUid", APIVersion:"v1", ResourceVersion:"", FieldPath:"spec.containers[3]"}): type: 'Normal' reason: 'Stopped' some verbose message: 1`,
|
|
|
|
|
expectUpdate: false,
|
|
|
|
|
@@ -864,11 +877,12 @@ func TestMultiSinkCache(t *testing.T) {
|
|
|
|
|
APIVersion: "v1",
|
|
|
|
|
FieldPath: "spec.containers[3]",
|
|
|
|
|
},
|
|
|
|
|
Reason: "Stopped",
|
|
|
|
|
Message: "some verbose message: 1",
|
|
|
|
|
Source: v1.EventSource{Component: "eventTest"},
|
|
|
|
|
Count: 2,
|
|
|
|
|
Type: v1.EventTypeNormal,
|
|
|
|
|
Reason: "Stopped",
|
|
|
|
|
Message: "some verbose message: 1",
|
|
|
|
|
Source: v1.EventSource{Component: "eventTest"},
|
|
|
|
|
ReportingController: "eventTest",
|
|
|
|
|
Count: 2,
|
|
|
|
|
Type: v1.EventTypeNormal,
|
|
|
|
|
},
|
|
|
|
|
expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"differentUid", APIVersion:"v1", ResourceVersion:"", FieldPath:"spec.containers[3]"}): type: 'Normal' reason: 'Stopped' some verbose message: 1`,
|
|
|
|
|
expectUpdate: true,
|
|
|
|
|
|