コード例 #1
0
ファイル: main_test.go プロジェクト: cfibmers/nsync
							{
								DesiredLRPKey: models.DesiredLRPKey{ // annotation mismatch so update
									ProcessGuid: "process-guid-2",
									Domain:      cc_messages.AppLRPDomain,
								},
							}, // missing 3 so create it
							{
								DesiredLRPKey: models.DesiredLRPKey{ // extra to be removed
									ProcessGuid: "process-guid-4",
									Domain:      cc_messages.AppLRPDomain,
								},
								Annotation: "4.1",
							},
						},
					}
					data, err := schedulingInfoResponse.Marshal()
					Expect(err).ToNot(HaveOccurred())

					fakeBBS.RouteToHandler("POST", "/v1/desired_lrp_scheduling_infos/list",
						ghttp.RespondWith(200, data, http.Header{bbs.ContentTypeHeader: []string{bbs.ProtoContentType}}),
					)

					fakeBBS.RouteToHandler("POST", "/v1/domains/upsert",
						ghttp.RespondWith(200, `{}`),
					)

					fakeBBS.RouteToHandler("POST", "/v1/desired_lrp/desire",
						ghttp.CombineHandlers(
							ghttp.VerifyContentType("application/x-protobuf"),
							func(w http.ResponseWriter, req *http.Request) {
								body, err := ioutil.ReadAll(req.Body)