(resources []*proto.Resource)
| 1202 | } |
| 1203 | |
| 1204 | func normalizeResources(resources []*proto.Resource) { |
| 1205 | for _, resource := range resources { |
| 1206 | sort.Slice(resource.Agents, func(i, j int) bool { |
| 1207 | return resource.Agents[i].Name < resource.Agents[j].Name |
| 1208 | }) |
| 1209 | |
| 1210 | for _, agent := range resource.Agents { |
| 1211 | agent.Id = "" |
| 1212 | if agent.GetToken() == "" { |
| 1213 | continue |
| 1214 | } |
| 1215 | agent.Auth = &proto.Agent_Token{} |
| 1216 | } |
| 1217 | } |
| 1218 | sort.Slice(resources, func(i, j int) bool { |
| 1219 | return resources[i].Name < resources[j].Name |
| 1220 | }) |
| 1221 | } |
| 1222 | |
| 1223 | // nolint:paralleltest |
| 1224 | func TestProvision_ExtraEnv(t *testing.T) { |
no test coverage detected