Commits

Ronny Pfannschmidt committed 270d106

replace POST /xjobfinished with POST /result

Comments (0)

Files changed (4)

tests/test_server.py

 def test_result_submit_and_get(app):
     xjobid = test_registerxjob(app)
     result = XResult(xjobid, "out", "err", 0)
-    rv = app.post("/xjobfinished", data=json_encode(result))
+    rv = app.post("/result", data=json_encode(result))
     assert rv.data == "Thanks."
     r = app.get("/getresult/%s" % xjobid)
     result2 = XResult.from_json(json.loads(r.data)['result'])

tests/test_slave.py

 
 def test_xjobfinished():
     xresult = XResult(1, out="1", err="2", retcode=0)
-    conn = MockConnPost("/xjobfinished", "ok")
+    conn = MockConnPost("/result", "ok")
     r = slave.xjobfinished(conn, xresult)
     assert conn._body == json_encode(xresult)
     assert r == "ok"
         return json_response(app, xjobid="no")
     return json_response(app, xjobid=xjobid, spec=xjob)
 
-@app.route("/xjobfinished", methods=['POST'])
-def xjobfinished():
+@app.route("/result", methods=['POST'])
+def xjobfinished(): 
     resultdata = json.loads(request.data)
     result = XResult.from_json(resultdata)
     xresultid = app.resultstorage.add(result)
 def xjobfinished(conn, result):
     log("submitting result %s", result)
     data = json_encode(result)
-    response = conn.POST("/xjobfinished", data)
+    response = conn.POST("/result", data)
     ack = response.read()
     log("server accepted, says: %s", ack)
     return ack