Merge pull request #12 from hpcloud-mon/func_test_fixes
Fixes for functional test
This commit is contained in:
commit
05d5a2b114
|
@ -14,13 +14,13 @@
|
|||
# limitations under the License.
|
||||
|
||||
import json
|
||||
import time
|
||||
|
||||
import requests
|
||||
import yaml
|
||||
|
||||
from monascaclient import ksclient
|
||||
|
||||
# events_url = "http://127.0.0.1:8082"
|
||||
events_url = "http://192.168.10.4:8082"
|
||||
|
||||
|
||||
|
@ -96,7 +96,7 @@ def test_stream_definition_post():
|
|||
body = {"fire_criteria": [{"event_type": "compute.instance.create.start"},
|
||||
{"event_type": "compute.instance.create.end"}],
|
||||
"description": "provisioning duration",
|
||||
"name": str(time.time()),
|
||||
"name": "func_test_stream_def",
|
||||
"group_by": ["instance_id"],
|
||||
"expiration": 3000,
|
||||
"select": [{"traits": {"tenant_id": "406904"},
|
||||
|
@ -108,6 +108,7 @@ def test_stream_definition_post():
|
|||
url=events_url + "/v2.0/stream-definitions",
|
||||
data=json.dumps(body),
|
||||
headers=headers)
|
||||
|
||||
assert response.status_code == 201
|
||||
print("POST /stream-definitions success")
|
||||
|
||||
|
|
Loading…
Reference in New Issue