assert.Equal(tc.T,osVal,betaOSVal,fmt.Sprintf("%T %s is has conflicting values for nodeSelector beta.kubernetes.io/os or kubernetes.io/os",obj,checker.Key(obj)))
tc.T.Logf("warn: beta.kubernetes.io/os nodeSelector has been deprecated but is used in %T %s",obj,checker.Key(obj))
assert.Contains(tc.T,[]string{"linux","windows"},betaOSVal,fmt.Sprintf("%T %s cannot have value for beta.kubernetes.io/os that is not 'linux' or 'windows': found %s",obj,checker.Key(obj),betaOSVal))
}
ifhasOSAnnotation{
ifosVal=="windows"{
checker.MapSet(tc,"Windows Workload",&obj,true)
}
assert.Contains(tc.T,[]string{"linux","windows"},osVal,fmt.Sprintf("%T %s cannot have value for kubernetes.io/os that is not 'linux' or 'windows': found %s",obj,checker.Key(obj),osVal))
}
assert.False(tc.T,!hasBetaOSAnnotation&&!hasOSAnnotation,fmt.Sprintf("%T %s is missing OS key for nodeSelector, expected to find either beta.kubernetes.io/os or kubernetes.io/os",obj,checker.Key(obj)))
assert.True(tc.T,foundToleration,"could not find toleration in workload %T %s that tolerates the NoSchedule 'cattle.io/os: linux' taint",obj,checker.Key(obj))