mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 00:07:50 +00:00
Job: Check ControllerRef Name and UID in unit test.
This commit is contained in:
parent
06536cb357
commit
fd8dd26d09
@ -291,6 +291,12 @@ func TestControllerSyncJob(t *testing.T) {
|
|||||||
if got, want := controllerRef.Kind, "Job"; got != want {
|
if got, want := controllerRef.Kind, "Job"; got != want {
|
||||||
t.Errorf("controllerRef.Kind = %q, want %q", got, want)
|
t.Errorf("controllerRef.Kind = %q, want %q", got, want)
|
||||||
}
|
}
|
||||||
|
if got, want := controllerRef.Name, job.Name; got != want {
|
||||||
|
t.Errorf("controllerRef.Name = %q, want %q", got, want)
|
||||||
|
}
|
||||||
|
if got, want := controllerRef.UID, job.UID; got != want {
|
||||||
|
t.Errorf("controllerRef.UID = %q, want %q", got, want)
|
||||||
|
}
|
||||||
if controllerRef.Controller == nil || *controllerRef.Controller != true {
|
if controllerRef.Controller == nil || *controllerRef.Controller != true {
|
||||||
t.Errorf("controllerRef.Controller is not set to true")
|
t.Errorf("controllerRef.Controller is not set to true")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user