Created
February 13, 2015 17:32
-
-
Save fgalan/b74b057399e6f8e2ed98 to your computer and use it in GitHub Desktop.
Tests for http://stackoverflow.com/questions/28498460/orion-cb-does-not-change-the-value-of-an-attribute
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fermin@oriondeb:~/src/fiware-orion$ mongo orion | |
MongoDB shell version: 2.4.9 | |
connecting to: orion | |
> db.dropDatabase() | |
{ "dropped" : "orion", "ok" : 1 } | |
> ^C | |
bye | |
fermin@oriondeb:~/src/fiware-orion$ (curl localhost:1026/ngsi10/contextEntities/cie_test_1/attributes/test_1 -s -S --header 'Content-Type: application/json' --header 'Accept: application/json' -d @- ) <<EOF | |
{"value":"10"} | |
EOF | |
"statusCode" : { | |
"code" : "200", | |
"reasonPhrase" : "OK" | |
} | |
fermin@oriondeb:~/src/fiware-orion$ curl http://localhost:1026/ngsi10/contextEntities/cie_test_1 --header 'Accept: application/json' | |
{ | |
"contextElement" : { | |
"type" : "", | |
"isPattern" : "false", | |
"id" : "cie_test_1", | |
"attributes" : [ | |
{ | |
"name" : "test_1", | |
"type" : "", | |
"value" : "10" | |
} | |
] | |
}, | |
"statusCode" : { | |
"code" : "200", | |
"reasonPhrase" : "OK" | |
} | |
} | |
fermin@oriondeb:~/src/fiware-orion$ (curl localhost:1026/ngsi10/contextEntities/cie_test_1/attributes/test_1 -s -S --header 'Content-Type: application/json' --header 'Accept: application/json' -d @- ) <<EOF | |
{"value":"50"} | |
EOF | |
"statusCode" : { | |
"code" : "200", | |
"reasonPhrase" : "OK" | |
} | |
fermin@oriondeb:~/src/fiware-orion$ curl http://localhost:1026/ngsi10/contextEntities/cie_test_1 --header 'Accept: application/json' { | |
"contextElement" : { | |
"type" : "", | |
"isPattern" : "false", | |
"id" : "cie_test_1", | |
"attributes" : [ | |
{ | |
"name" : "test_1", | |
"type" : "", | |
"value" : "50" | |
} | |
] | |
}, | |
"statusCode" : { | |
"code" : "200", | |
"reasonPhrase" : "OK" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment