MCPcopy Index your code
hub / github.com/cortexlabs/cortex / TestNested

Function TestNested

pkg/lib/configreader/reader_test.go:84–167  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

82}
83
84func TestNested(t *testing.T) {
85 structValidation := &StructValidation{
86 StructFieldValidations: []*StructFieldValidation{
87 {
88 // Key: "key0",
89 StructField: "Key0",
90 Float64Validation: &Float64Validation{},
91 },
92 {
93 // Key: "key1",
94 StructField: "Key1",
95 StructValidation: &StructValidation{
96 StructFieldValidations: []*StructFieldValidation{
97 {
98 // Key: "key11",
99 StructField: "Key11",
100 Int32Validation: &Int32Validation{},
101 },
102 },
103 Required: true,
104 ShortCircuit: true,
105 },
106 },
107 {
108 // Key: "key2",
109 StructField: "Key2",
110 StructValidation: &StructValidation{
111 StructFieldValidations: []*StructFieldValidation{
112 {
113 // Key: "key21",
114 StructField: "Key21",
115 StringValidation: &StringValidation{},
116 },
117 {
118 // Key: "key22",
119 StructField: "Key22",
120 StructValidation: &StructValidation{
121 StructFieldValidations: []*StructFieldValidation{
122 {
123 // Key: "key31",
124 StructField: "Key31",
125 IntValidation: &IntValidation{},
126 },
127 },
128 Required: true,
129 ShortCircuit: true,
130 },
131 },
132 },
133 Required: true,
134 ShortCircuit: true,
135 },
136 },
137 },
138 Required: true,
139 ShortCircuit: true,
140 }
141

Callers

nothing calls this directly

Calls 2

MustReadYAMLStrFunction · 0.85
testConfigFunction · 0.85

Tested by

no test coverage detected