Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestRemoveNestedField (0.36 sec)

  1. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers_test.go

    	wg.Add(concurrency)
    	for i := 0; i < concurrency; i++ {
    		go func() {
    			defer wg.Done()
    			assert.NoError(t, UnstructuredJSONScheme.Encode(&list, ioutil.Discard))
    		}()
    	}
    	wg.Wait()
    }
    
    func TestRemoveNestedField(t *testing.T) {
    	obj := map[string]interface{}{
    		"x": map[string]interface{}{
    			"y": 1,
    			"a": "foo",
    		},
    	}
    	RemoveNestedField(obj, "x", "a")
    	assert.Len(t, obj["x"], 1)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 24 07:53:28 UTC 2021
    - 5.9K bytes
    - Viewed (0)
Back to top