mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Merge pull request #127691 from mmorel-35/testifylint/expected-actual@k8s.io/apimachinery
fix: enable expected-actual rule from testifylint in module `k8s.io/apimachinery`
This commit is contained in:
		@@ -178,7 +178,7 @@ func TestSetNestedStringSlice(t *testing.T) {
 | 
				
			|||||||
	assert.NoError(t, err)
 | 
						assert.NoError(t, err)
 | 
				
			||||||
	assert.Len(t, obj["x"], 3)
 | 
						assert.Len(t, obj["x"], 3)
 | 
				
			||||||
	assert.Len(t, obj["x"].(map[string]interface{})["z"], 1)
 | 
						assert.Len(t, obj["x"].(map[string]interface{})["z"], 1)
 | 
				
			||||||
	assert.Equal(t, obj["x"].(map[string]interface{})["z"].([]interface{})[0], "bar")
 | 
						assert.Equal(t, "bar", obj["x"].(map[string]interface{})["z"].([]interface{})[0])
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestSetNestedSlice(t *testing.T) {
 | 
					func TestSetNestedSlice(t *testing.T) {
 | 
				
			||||||
@@ -193,7 +193,7 @@ func TestSetNestedSlice(t *testing.T) {
 | 
				
			|||||||
	assert.NoError(t, err)
 | 
						assert.NoError(t, err)
 | 
				
			||||||
	assert.Len(t, obj["x"], 3)
 | 
						assert.Len(t, obj["x"], 3)
 | 
				
			||||||
	assert.Len(t, obj["x"].(map[string]interface{})["z"], 1)
 | 
						assert.Len(t, obj["x"].(map[string]interface{})["z"], 1)
 | 
				
			||||||
	assert.Equal(t, obj["x"].(map[string]interface{})["z"].([]interface{})[0], "bar")
 | 
						assert.Equal(t, "bar", obj["x"].(map[string]interface{})["z"].([]interface{})[0])
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestSetNestedStringMap(t *testing.T) {
 | 
					func TestSetNestedStringMap(t *testing.T) {
 | 
				
			||||||
@@ -208,7 +208,7 @@ func TestSetNestedStringMap(t *testing.T) {
 | 
				
			|||||||
	assert.NoError(t, err)
 | 
						assert.NoError(t, err)
 | 
				
			||||||
	assert.Len(t, obj["x"], 3)
 | 
						assert.Len(t, obj["x"], 3)
 | 
				
			||||||
	assert.Len(t, obj["x"].(map[string]interface{})["z"], 1)
 | 
						assert.Len(t, obj["x"].(map[string]interface{})["z"], 1)
 | 
				
			||||||
	assert.Equal(t, obj["x"].(map[string]interface{})["z"].(map[string]interface{})["b"], "bar")
 | 
						assert.Equal(t, "bar", obj["x"].(map[string]interface{})["z"].(map[string]interface{})["b"])
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestSetNestedMap(t *testing.T) {
 | 
					func TestSetNestedMap(t *testing.T) {
 | 
				
			||||||
@@ -223,5 +223,5 @@ func TestSetNestedMap(t *testing.T) {
 | 
				
			|||||||
	assert.NoError(t, err)
 | 
						assert.NoError(t, err)
 | 
				
			||||||
	assert.Len(t, obj["x"], 3)
 | 
						assert.Len(t, obj["x"], 3)
 | 
				
			||||||
	assert.Len(t, obj["x"].(map[string]interface{})["z"], 1)
 | 
						assert.Len(t, obj["x"].(map[string]interface{})["z"], 1)
 | 
				
			||||||
	assert.Equal(t, obj["x"].(map[string]interface{})["z"].(map[string]interface{})["b"], "bar")
 | 
						assert.Equal(t, "bar", obj["x"].(map[string]interface{})["z"].(map[string]interface{})["b"])
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -287,7 +287,7 @@ func TestIndexModels(t *testing.T) {
 | 
				
			|||||||
		resultNames[k] = *v.TypeRef.NamedType
 | 
							resultNames[k] = *v.TypeRef.NamedType
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	require.Equal(t, resultNames, map[schema.GroupVersionKind]string{
 | 
						require.Equal(t, map[schema.GroupVersionKind]string{
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			Group:   "mygroup",
 | 
								Group:   "mygroup",
 | 
				
			||||||
			Version: "v1",
 | 
								Version: "v1",
 | 
				
			||||||
@@ -313,5 +313,5 @@ func TestIndexModels(t *testing.T) {
 | 
				
			|||||||
			Version: "v3",
 | 
								Version: "v3",
 | 
				
			||||||
			Kind:    "MyOtherKind",
 | 
								Kind:    "MyOtherKind",
 | 
				
			||||||
		}: "def3",
 | 
							}: "def3",
 | 
				
			||||||
	})
 | 
						}, resultNames)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user