@@ -20,6 +20,7 @@ const appSettingsFixture string = `
2020 "routable": true,
2121 "whitelist": ["1.2.3.4", "0.0.0.0/0"],
2222 "autoscale": {"cmd": {"min": 3, "max": 8, "cpu_percent": 40}},
23+ "label": {"git_repo": "https://github.com/deis/controller-sdk-go", "team" : "deis"},
2324 "created": "2014-01-01T00:00:00UTC",
2425 "updated": "2014-01-01T00:00:00UTC",
2526 "uuid": "de1bf5b5-4a72-4f94-a10c-d2a3741cdf75"
@@ -34,14 +35,15 @@ const appSettingsUnsetFixture string = `
3435 "routable": true,
3536 "whitelist": ["1.2.3.4", "0.0.0.0/0"],
3637 "autoscale": {"cmd": {"min": 3, "max": 8, "cpu_percent": 40}},
38+ "label": {"git_repo": "https://github.com/deis/controller-sdk-go", "team" : "deis"},
3739 "created": "2014-01-01T00:00:00UTC",
3840 "updated": "2014-01-01T00:00:00UTC",
3941 "uuid": "de1bf5b5-4a72-4f94-a10c-d2a3741cdf75"
4042}
4143`
4244
43- const appSettingsSetExpected string = `{"maintenance":true,"routable":true,"whitelist":["1.2.3.4","0.0.0.0/0"],"autoscale":{"cmd":{"min":3,"max":8,"cpu_percent":40}}}`
44- const appSettingsUnsetExpected string = `{"maintenance":true,"routable":true,"whitelist":["1.2.3.4","0.0.0.0/0"],"autoscale":{"cmd":{"min":3,"max":8,"cpu_percent":40}}}`
45+ const appSettingsSetExpected string = `{"maintenance":true,"routable":true,"whitelist":["1.2.3.4","0.0.0.0/0"],"autoscale":{"cmd":{"min":3,"max":8,"cpu_percent":40}},"label":{"git_repo":"https://github.com/deis/controller-sdk-go","team":"deis"} }`
46+ const appSettingsUnsetExpected string = `{"maintenance":true,"routable":true,"whitelist":["1.2.3.4","0.0.0.0/0"],"autoscale":{"cmd":{"min":3,"max":8,"cpu_percent":40}},"label":{"git_repo":"https://github.com/deis/controller-sdk-go","team":"deis"} }`
4547
4648var trueVar = true
4749
@@ -138,6 +140,10 @@ func TestAppSettingsSet(t *testing.T) {
138140 CPUPercent : 40 ,
139141 },
140142 },
143+ Label : map [string ]interface {}{
144+ "git_repo" : "https://github.com/deis/controller-sdk-go" ,
145+ "team" : "deis" ,
146+ },
141147 Created : "2014-01-01T00:00:00UTC" ,
142148 Updated : "2014-01-01T00:00:00UTC" ,
143149 UUID : "de1bf5b5-4a72-4f94-a10c-d2a3741cdf75" ,
@@ -154,6 +160,10 @@ func TestAppSettingsSet(t *testing.T) {
154160 CPUPercent : 40 ,
155161 },
156162 },
163+ Label : map [string ]interface {}{
164+ "git_repo" : "https://github.com/deis/controller-sdk-go" ,
165+ "team" : "deis" ,
166+ },
157167 }
158168
159169 actual , err := Set (deis , "example-go" , appSettingsVars )
@@ -192,6 +202,10 @@ func TestAppSettingsUnset(t *testing.T) {
192202 CPUPercent : 40 ,
193203 },
194204 },
205+ Label : map [string ]interface {}{
206+ "git_repo" : "https://github.com/deis/controller-sdk-go" ,
207+ "team" : "deis" ,
208+ },
195209 Created : "2014-01-01T00:00:00UTC" ,
196210 Updated : "2014-01-01T00:00:00UTC" ,
197211 UUID : "de1bf5b5-4a72-4f94-a10c-d2a3741cdf75" ,
@@ -208,6 +222,10 @@ func TestAppSettingsUnset(t *testing.T) {
208222 CPUPercent : 40 ,
209223 },
210224 },
225+ Label : map [string ]interface {}{
226+ "git_repo" : "https://github.com/deis/controller-sdk-go" ,
227+ "team" : "deis" ,
228+ },
211229 }
212230
213231 actual , err := Set (deis , "unset-test" , appSettingsVars )
@@ -246,6 +264,10 @@ func TestAppSettingsList(t *testing.T) {
246264 CPUPercent : 40 ,
247265 },
248266 },
267+ Label : map [string ]interface {}{
268+ "git_repo" : "https://github.com/deis/controller-sdk-go" ,
269+ "team" : "deis" ,
270+ },
249271 Created : "2014-01-01T00:00:00UTC" ,
250272 Updated : "2014-01-01T00:00:00UTC" ,
251273 UUID : "de1bf5b5-4a72-4f94-a10c-d2a3741cdf75" ,
0 commit comments