mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-15 06:01:50 +00:00
@@ -107,11 +107,11 @@ func (EverythingMatcher) Matches(obj runtime.Object) (bool, error) {
|
||||
func TestEtcdList(t *testing.T) {
|
||||
podA := &api.Pod{
|
||||
ObjectMeta: api.ObjectMeta{Name: "foo"},
|
||||
Status: api.PodStatus{Host: "machine"},
|
||||
Spec: api.PodSpec{Host: "machine"},
|
||||
}
|
||||
podB := &api.Pod{
|
||||
ObjectMeta: api.ObjectMeta{Name: "bar"},
|
||||
Status: api.PodStatus{Host: "machine"},
|
||||
Spec: api.PodSpec{Host: "machine"},
|
||||
}
|
||||
|
||||
normalListResp := &etcd.Response{
|
||||
@@ -189,11 +189,11 @@ func TestEtcdList(t *testing.T) {
|
||||
func TestEtcdCreate(t *testing.T) {
|
||||
podA := &api.Pod{
|
||||
ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: api.NamespaceDefault},
|
||||
Status: api.PodStatus{Host: "machine"},
|
||||
Spec: api.PodSpec{Host: "machine"},
|
||||
}
|
||||
podB := &api.Pod{
|
||||
ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: api.NamespaceDefault},
|
||||
Status: api.PodStatus{Host: "machine2"},
|
||||
Spec: api.PodSpec{Host: "machine2"},
|
||||
}
|
||||
|
||||
nodeWithPodA := tools.EtcdResponseWithError{
|
||||
@@ -268,11 +268,11 @@ func TestEtcdCreate(t *testing.T) {
|
||||
func TestEtcdCreateWithName(t *testing.T) {
|
||||
podA := &api.Pod{
|
||||
ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: api.NamespaceDefault},
|
||||
Status: api.PodStatus{Host: "machine"},
|
||||
Spec: api.PodSpec{Host: "machine"},
|
||||
}
|
||||
podB := &api.Pod{
|
||||
ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: api.NamespaceDefault},
|
||||
Status: api.PodStatus{Host: "machine2"},
|
||||
Spec: api.PodSpec{Host: "machine2"},
|
||||
}
|
||||
|
||||
nodeWithPodA := tools.EtcdResponseWithError{
|
||||
@@ -344,11 +344,11 @@ func TestEtcdCreateWithName(t *testing.T) {
|
||||
func TestEtcdUpdate(t *testing.T) {
|
||||
podA := &api.Pod{
|
||||
ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: api.NamespaceDefault},
|
||||
Status: api.PodStatus{Host: "machine"},
|
||||
Spec: api.PodSpec{Host: "machine"},
|
||||
}
|
||||
podB := &api.Pod{
|
||||
ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: api.NamespaceDefault, ResourceVersion: "1"},
|
||||
Status: api.PodStatus{Host: "machine2"},
|
||||
Spec: api.PodSpec{Host: "machine2"},
|
||||
}
|
||||
|
||||
nodeWithPodA := tools.EtcdResponseWithError{
|
||||
@@ -460,11 +460,11 @@ func TestEtcdUpdate(t *testing.T) {
|
||||
func TestEtcdUpdateWithName(t *testing.T) {
|
||||
podA := &api.Pod{
|
||||
ObjectMeta: api.ObjectMeta{Name: "foo"},
|
||||
Status: api.PodStatus{Host: "machine"},
|
||||
Spec: api.PodSpec{Host: "machine"},
|
||||
}
|
||||
podB := &api.Pod{
|
||||
ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "1"},
|
||||
Status: api.PodStatus{Host: "machine2"},
|
||||
Spec: api.PodSpec{Host: "machine2"},
|
||||
}
|
||||
|
||||
nodeWithPodA := tools.EtcdResponseWithError{
|
||||
@@ -535,7 +535,7 @@ func TestEtcdUpdateWithName(t *testing.T) {
|
||||
func TestEtcdGet(t *testing.T) {
|
||||
podA := &api.Pod{
|
||||
ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "1"},
|
||||
Status: api.PodStatus{Host: "machine"},
|
||||
Spec: api.PodSpec{Host: "machine"},
|
||||
}
|
||||
|
||||
nodeWithPodA := tools.EtcdResponseWithError{
|
||||
@@ -591,7 +591,7 @@ func TestEtcdGet(t *testing.T) {
|
||||
func TestEtcdDelete(t *testing.T) {
|
||||
podA := &api.Pod{
|
||||
ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "1"},
|
||||
Status: api.PodStatus{Host: "machine"},
|
||||
Spec: api.PodSpec{Host: "machine"},
|
||||
}
|
||||
|
||||
nodeWithPodA := tools.EtcdResponseWithError{
|
||||
@@ -650,7 +650,7 @@ func TestEtcdDelete(t *testing.T) {
|
||||
func TestEtcdWatch(t *testing.T) {
|
||||
podA := &api.Pod{
|
||||
ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "1"},
|
||||
Status: api.PodStatus{Host: "machine"},
|
||||
Spec: api.PodSpec{Host: "machine"},
|
||||
}
|
||||
respWithPodA := &etcd.Response{
|
||||
Node: &etcd.Node{
|
||||
|
Reference in New Issue
Block a user