(t *testing.T)
| 1046 | } |
| 1047 | |
| 1048 | func TestUpdateGetUpdatedConfigs(t *testing.T) { |
| 1049 | // cannedConfigs is a set of configs that we'll use over and over in the |
| 1050 | // tests. it's a map of Name to Config |
| 1051 | cannedConfigs := map[string]*swarm.Config{ |
| 1052 | "bar": { |
| 1053 | ID: "barID", |
| 1054 | Spec: swarm.ConfigSpec{ |
| 1055 | Annotations: swarm.Annotations{ |
| 1056 | Name: "bar", |
| 1057 | }, |
| 1058 | }, |
| 1059 | }, |
| 1060 | "cred": { |
| 1061 | ID: "credID", |
| 1062 | Spec: swarm.ConfigSpec{ |
| 1063 | Annotations: swarm.Annotations{ |
| 1064 | Name: "cred", |
| 1065 | }, |
| 1066 | }, |
| 1067 | }, |
| 1068 | "newCred": { |
| 1069 | ID: "newCredID", |
| 1070 | Spec: swarm.ConfigSpec{ |
| 1071 | Annotations: swarm.Annotations{ |
| 1072 | Name: "newCred", |
| 1073 | }, |
| 1074 | }, |
| 1075 | }, |
| 1076 | } |
| 1077 | // cannedConfigRefs is the same thing, but with config references instead |
| 1078 | // of ID, however, it just maps an arbitrary string value. this is |
| 1079 | // so we could have multiple config refs using the same config |
| 1080 | cannedConfigRefs := map[string]*swarm.ConfigReference{ |
| 1081 | "fooRef": { |
| 1082 | ConfigID: "fooID", |
| 1083 | ConfigName: "foo", |
| 1084 | File: &swarm.ConfigReferenceFileTarget{ |
| 1085 | Name: "foo", |
| 1086 | UID: "0", |
| 1087 | GID: "0", |
| 1088 | Mode: 0o444, |
| 1089 | }, |
| 1090 | }, |
| 1091 | "barRef": { |
| 1092 | ConfigID: "barID", |
| 1093 | ConfigName: "bar", |
| 1094 | File: &swarm.ConfigReferenceFileTarget{ |
| 1095 | Name: "bar", |
| 1096 | UID: "0", |
| 1097 | GID: "0", |
| 1098 | Mode: 0o444, |
| 1099 | }, |
| 1100 | }, |
| 1101 | "bazRef": { |
| 1102 | ConfigID: "bazID", |
| 1103 | ConfigName: "baz", |
| 1104 | File: &swarm.ConfigReferenceFileTarget{ |
| 1105 | Name: "baz", |
nothing calls this directly
no test coverage detected
searching dependent graphs…