mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-20 09:33:52 +00:00
Add unit and integration tests for multiple profiles support
Signed-off-by: Aldo Culquicondor <acondor@google.com>
This commit is contained in:
@@ -15,6 +15,7 @@ go_library(
|
||||
"//pkg/scheduler/framework/v1alpha1:go_default_library",
|
||||
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
@@ -21,6 +21,7 @@ import (
|
||||
|
||||
"k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
)
|
||||
|
||||
var zero int64
|
||||
@@ -150,6 +151,18 @@ func (p *PodWrapper) Name(s string) *PodWrapper {
|
||||
return p
|
||||
}
|
||||
|
||||
// UID sets `s` as the UID of the inner pod.
|
||||
func (p *PodWrapper) UID(s string) *PodWrapper {
|
||||
p.SetUID(types.UID(s))
|
||||
return p
|
||||
}
|
||||
|
||||
// SchedulerName sets `s` as the scheduler name of the inner pod.
|
||||
func (p *PodWrapper) SchedulerName(s string) *PodWrapper {
|
||||
p.Spec.SchedulerName = s
|
||||
return p
|
||||
}
|
||||
|
||||
// Namespace sets `s` as the namespace of the inner pod.
|
||||
func (p *PodWrapper) Namespace(s string) *PodWrapper {
|
||||
p.SetNamespace(s)
|
||||
@@ -363,6 +376,12 @@ func (n *NodeWrapper) Name(s string) *NodeWrapper {
|
||||
return n
|
||||
}
|
||||
|
||||
// UID sets `s` as the UID of the inner pod.
|
||||
func (n *NodeWrapper) UID(s string) *NodeWrapper {
|
||||
n.SetUID(types.UID(s))
|
||||
return n
|
||||
}
|
||||
|
||||
// Label applies a {k,v} label pair to the inner node.
|
||||
func (n *NodeWrapper) Label(k, v string) *NodeWrapper {
|
||||
if n.Labels == nil {
|
||||
|
Reference in New Issue
Block a user