@@ -20,12 +20,9 @@ const configFixture string = `
2020 "TEST": "testing",
2121 "FOO": "bar"
2222 },
23- "memory": {
24- "web": "1G"
25- },
26- "cpu": {
27- "web": "1000"
28- },
23+ "limits": {
24+ "web": "std1.xlarge.c1m1"
25+ },
2926 "tags": {
3027 "test": "tests"
3128 },
@@ -43,8 +40,7 @@ const configUnsetFixture string = `
4340 "owner": "test",
4441 "app": "unset-test",
4542 "values": {},
46- "memory": {},
47- "cpu": {},
43+ "limits": {},
4844 "tags": {},
4945 "registry": {},
5046 "created": "2014-01-01T00:00:00UTC",
@@ -53,8 +49,8 @@ const configUnsetFixture string = `
5349}
5450`
5551
56- const configSetExpected string = `{"values":{"FOO":"bar","TEST":"testing"},"memory ":{"web":"1G"},"cpu":{"web":"1000 "},"tags":{"test":"tests"},"registry":{"username":"bob"}}`
57- const configUnsetExpected string = `{"values":{"FOO":null,"TEST":null},"memory":{"web":null},"cpu ":{"web":null},"tags":{"test":null},"registry":{"username":null}}`
52+ const configSetExpected string = `{"values":{"FOO":"bar","TEST":"testing"},"limits ":{"web":"std1.xlarge.c1m1 "},"tags":{"test":"tests"},"registry":{"username":"bob"}}`
53+ const configUnsetExpected string = `{"values":{"FOO":null,"TEST":null},"limits ":{"web":null},"tags":{"test":null},"registry":{"username":null}}`
5854
5955type fakeHTTPServer struct {}
6056
@@ -132,11 +128,8 @@ func TestConfigSet(t *testing.T) {
132128 "TEST" : "testing" ,
133129 "FOO" : "bar" ,
134130 },
135- Memory : map [string ]interface {}{
136- "web" : "1G" ,
137- },
138- CPU : map [string ]interface {}{
139- "web" : "1000" ,
131+ Limits : map [string ]interface {}{
132+ "web" : "std1.xlarge.c1m1" ,
140133 },
141134 Tags : map [string ]interface {}{
142135 "test" : "tests" ,
@@ -154,11 +147,8 @@ func TestConfigSet(t *testing.T) {
154147 "TEST" : "testing" ,
155148 "FOO" : "bar" ,
156149 },
157- Memory : map [string ]interface {}{
158- "web" : "1G" ,
159- },
160- CPU : map [string ]interface {}{
161- "web" : "1000" ,
150+ Limits : map [string ]interface {}{
151+ "web" : "std1.xlarge.c1m1" ,
162152 },
163153 Tags : map [string ]interface {}{
164154 "test" : "tests" ,
@@ -195,8 +185,7 @@ func TestConfigUnset(t *testing.T) {
195185 Owner : "test" ,
196186 App : "unset-test" ,
197187 Values : map [string ]interface {}{},
198- Memory : map [string ]interface {}{},
199- CPU : map [string ]interface {}{},
188+ Limits : map [string ]interface {}{},
200189 Tags : map [string ]interface {}{},
201190 Registry : map [string ]interface {}{},
202191 Created : "2014-01-01T00:00:00UTC" ,
@@ -209,10 +198,7 @@ func TestConfigUnset(t *testing.T) {
209198 "TEST" : nil ,
210199 "FOO" : nil ,
211200 },
212- Memory : map [string ]interface {}{
213- "web" : nil ,
214- },
215- CPU : map [string ]interface {}{
201+ Limits : map [string ]interface {}{
216202 "web" : nil ,
217203 },
218204 Tags : map [string ]interface {}{
@@ -253,11 +239,8 @@ func TestConfigList(t *testing.T) {
253239 "TEST" : "testing" ,
254240 "FOO" : "bar" ,
255241 },
256- Memory : map [string ]interface {}{
257- "web" : "1G" ,
258- },
259- CPU : map [string ]interface {}{
260- "web" : "1000" ,
242+ Limits : map [string ]interface {}{
243+ "web" : "std1.xlarge.c1m1" ,
261244 },
262245 Tags : map [string ]interface {}{
263246 "test" : "tests" ,
0 commit comments