Skip to content

Commit

Permalink
Merge 05398d6 into 81d5fac
Browse files Browse the repository at this point in the history
  • Loading branch information
fisuda committed Aug 19, 2023
2 parents 81d5fac + 05398d6 commit af2b4f7
Show file tree
Hide file tree
Showing 10 changed files with 78 additions and 26 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
## NGSI Go v0.12.0-next

- Update: Update build and test environment (#261)
- Update: Update golang to 1.20.6 (#260)
- Update: Update Node.js dependencies (#253)
- Update: Update copyright date (#251)
- Add: Revert 1102_tokenproxy_command.test (#250)
- Add: Add SECURITY.md (#249)
- Update: Update golang to 1.19.4 (#248)
- Update: Update Node.js dependencies (#247)
- Update: Update Orion to 3.6.0 (#244)
- Update: Update Orion to 3.7.0 (#244)
- Fix: Fix gosimple S1001 error (#243)

## NGSI Go v0.12.0 - March 19, 2022
Expand Down
12 changes: 6 additions & 6 deletions e2e/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@
# SOFTWARE.

build:
docker-compose build --no-cache
docker compose build --no-cache
up:
script/docker-compose-up.sh
down:
docker-compose down
docker compose down
ps:
docker-compose ps
docker compose ps
logs:
docker-compose logs
docker compose logs
rmi:
script/rmi.sh
shell:
docker-compose exec ngsi-test bash
docker compose exec ngsi-test bash
run_e2e_test:
docker-compose exec -T ngsi-test /usr/local/bin/ngsi-test -verbose cases/
docker compose exec -T ngsi-test /usr/local/bin/ngsi-test -verbose cases/
3 changes: 2 additions & 1 deletion e2e/cases/4000_ngsi-v2/9002_issue_201_subs.test
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ ngsi get subscription --id $id --pretty --raw
}
],
"condition": {
"attrs": []
"attrs": [],
"notifyOnMetadataChange": true
}
},
"notification": {
Expand Down
40 changes: 40 additions & 0 deletions e2e/cases/6000_time_series/1000_comet/0010_comet.test
Original file line number Diff line number Diff line change
Expand Up @@ -47,52 +47,72 @@ attr --type Thing --id device001 --attr A1 --hLimit 10 --hOffset 0 --pretty
"type": "StructuredValue",
"value": [
{
"_id": "REGEX(.*)",
"recvTime": "2016-09-13T00:00:00.000Z",
"attrName": "A1",
"attrType": "Number",
"attrValue": 1
},
{
"_id": "REGEX(.*)",
"recvTime": "2016-09-13T00:01:00.000Z",
"attrName": "A1",
"attrType": "Number",
"attrValue": 2
},
{
"_id": "REGEX(.*)",
"recvTime": "2016-09-13T00:02:00.000Z",
"attrName": "A1",
"attrType": "Number",
"attrValue": 3
},
{
"_id": "REGEX(.*)",
"recvTime": "2016-09-13T00:03:00.000Z",
"attrName": "A1",
"attrType": "Number",
"attrValue": 4
},
{
"_id": "REGEX(.*)",
"recvTime": "2016-09-13T00:04:00.000Z",
"attrName": "A1",
"attrType": "Number",
"attrValue": 5
},
{
"_id": "REGEX(.*)",
"recvTime": "2016-09-13T00:05:00.000Z",
"attrName": "A1",
"attrType": "Number",
"attrValue": 6
},
{
"_id": "REGEX(.*)",
"recvTime": "2016-09-13T00:06:00.000Z",
"attrName": "A1",
"attrType": "Number",
"attrValue": 7
},
{
"_id": "REGEX(.*)",
"recvTime": "2016-09-13T00:07:00.000Z",
"attrName": "A1",
"attrType": "Number",
"attrValue": 8
},
{
"_id": "REGEX(.*)",
"recvTime": "2016-09-13T00:08:00.000Z",
"attrName": "A1",
"attrType": "Number",
"attrValue": 9
},
{
"_id": "REGEX(.*)",
"recvTime": "2016-09-13T00:09:00.000Z",
"attrName": "A1",
"attrType": "Number",
"attrValue": 10
}
Expand All @@ -111,52 +131,72 @@ attr --type Thing --id device001 --attr A1 --lastN 10 --pretty
"type": "StructuredValue",
"value": [
{
"_id": "REGEX(.*)",
"recvTime": "2016-09-15T01:50:00.000Z",
"attrName": "A1",
"attrType": "Number",
"attrValue": 2991
},
{
"_id": "REGEX(.*)",
"recvTime": "2016-09-15T01:51:00.000Z",
"attrName": "A1",
"attrType": "Number",
"attrValue": 2992
},
{
"_id": "REGEX(.*)",
"recvTime": "2016-09-15T01:52:00.000Z",
"attrName": "A1",
"attrType": "Number",
"attrValue": 2993
},
{
"_id": "REGEX(.*)",
"recvTime": "2016-09-15T01:53:00.000Z",
"attrName": "A1",
"attrType": "Number",
"attrValue": 2994
},
{
"_id": "REGEX(.*)",
"recvTime": "2016-09-15T01:54:00.000Z",
"attrName": "A1",
"attrType": "Number",
"attrValue": 2995
},
{
"_id": "REGEX(.*)",
"recvTime": "2016-09-15T01:55:00.000Z",
"attrName": "A1",
"attrType": "Number",
"attrValue": 2996
},
{
"_id": "REGEX(.*)",
"recvTime": "2016-09-15T01:56:00.000Z",
"attrName": "A1",
"attrType": "Number",
"attrValue": 2997
},
{
"_id": "REGEX(.*)",
"recvTime": "2016-09-15T01:57:00.000Z",
"attrName": "A1",
"attrType": "Number",
"attrValue": 2998
},
{
"_id": "REGEX(.*)",
"recvTime": "2016-09-15T01:58:00.000Z",
"attrName": "A1",
"attrType": "Number",
"attrValue": 2999
},
{
"_id": "REGEX(.*)",
"recvTime": "2016-09-15T01:59:00.000Z",
"attrName": "A1",
"attrType": "Number",
"attrValue": 3000
}
Expand Down
4 changes: 2 additions & 2 deletions e2e/cases/6100_iot_agent/0021_iota_services.test
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ ngsi services list --pretty
"apikey": "4jggokgpepnvsb2uv4s40d59ov",
"service": "openiot",
"subservice": "/",
"__v": 0,
"__v": REGEX(.*),
"static_attributes": [],
"internal_attributes": [],
"entity_type": "Thing"
Expand Down Expand Up @@ -101,7 +101,7 @@ ngsi services list --pretty
"apikey": "4jggokgpepnvsb2uv4s40d59ov",
"service": "openiot",
"subservice": "/",
"__v": 0,
"__v": REGEX(.*),
"static_attributes": [],
"internal_attributes": [],
"entity_type": "Event"
Expand Down
1 change: 1 addition & 0 deletions e2e/cases/6100_iot_agent/0030_iota_devices_create.test
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ ngsi devices list --pretty
"entity_name": "urn:ngsi-ld:WeatherObserved:sensor001",
"entity_type": "Sensor",
"transport": "HTTP",
"polling": true,
"attributes": [
{
"object_id": "d",
Expand Down
23 changes: 12 additions & 11 deletions e2e/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ version: "3"

services:
orion:
image: telefonicaiot/fiware-orion:3.7.0
image: telefonicaiot/fiware-orion:3.10.1
depends_on:
- mongo
command: -dbhost mongo

orion-ld:
image: fiware/orion-ld:1.0.1
image: quay.io/fiware/orion-ld:1.0.1
restart: always
depends_on:
- mongo
Expand All @@ -47,7 +47,7 @@ services:
- ./config/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro

comet:
image: fiware/sth-comet:2.8.0
image: telefonicaiot/fiware-sth-comet:2.10.0
restart: always
depends_on:
- mongo
Expand All @@ -69,7 +69,7 @@ services:
- CRATE_HEAP_SIZE=2g

iot-agent:
image: fiware/iotagent-ul:1.15.0
image: telefonicaiot/iotagent-ul:2.2.0
depends_on:
- mongo
environment:
Expand All @@ -86,7 +86,7 @@ services:
- IOTA_PROVIDER_URL=http://iot-agent:4041

perseo:
image: telefonicaiot/perseo-fe:1.15.0
image: telefonicaiot/perseo-fe:1.27.0
restart: always
depends_on:
- mongo
Expand All @@ -97,12 +97,12 @@ services:
- PERSEO_ORION_URL=http://orion:1026/

perseo-core:
image: telefonicaiot/perseo-core:1.6.0
image: telefonicaiot/perseo-core:1.13.0
environment:
- PERSEO_FE_URL=http://perseo:9090

pep-proxy:
image: letsfiware/pep-proxy:8.1.0-distroless
image: letsfiware/fiware-pep-proxy:8.4.0
depends_on:
- keyrock
environment:
Expand All @@ -115,9 +115,10 @@ services:
- PEP_PROXY_APP_ID=de95b7b2-2be4-46c8-89da-0aa633cd594c
- PEP_PROXY_USERNAME=pep_proxy_132b693f-decb-4eec-a23f-687b503abd4b
- PEP_PASSWORD=pep_proxy_955add39-c55b-46f3-bcb5-944cfcaba758
- PEP_PROXY_AUTH_ENABLED=false

keyrock:
image: letsfiware/idm:8.1.0-distroless
image: letsfiware/fiware-idm:8.4.0
depends_on:
- mysql
environment:
Expand All @@ -132,7 +133,7 @@ services:
- IDM_ADMIN_PASS=1234

cygnus:
image: telefonicaiot/fiware-cygnus:2.16.0
image: telefonicaiot/fiware-cygnus:3.2.0
depends_on:
- mongo
networks:
Expand All @@ -146,7 +147,7 @@ services:
- ./config/cygnus-name_mappings.conf:/opt/apache-flume/conf/name_mappings.conf

wirecloud:
image: fiware/wirecloud:1.3.1
image: quay.io/fiware/wirecloud:1.3.1
depends_on:
- keyrock
environment:
Expand All @@ -156,7 +157,7 @@ services:
- SOCIAL_AUTH_FIWARE_SECRET=ec7392a4-5163-4d84-a64c-d9e0b7dfb309

mysql:
image: mysql:5.7.33
image: mysql:5.7
environment:
- MYSQL_ROOT_PASSWORD=secret
volumes:
Expand Down
10 changes: 7 additions & 3 deletions e2e/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,17 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

set -eu

if [ ! -e "$1" ]; then
echo "$1 not found."
fi

type docker-compose > /dev/null
if [ $? -eq 0 ]; then
docker-compose exec ngsi-test /usr/local/bin/ngsi-test -verbose "$1"
set +e
found=$(docker info --format '{{json . }}' | jq -r '.ClientInfo.Plugins | .[].Name' | ${GREP_CMD} -ic compose)
set -e
if [ "${found}" -eq 1 ]; then
docker compose exec ngsi-test /usr/local/bin/ngsi-test -verbose "$1"
else
if [ -e /usr/local/bin/ngsi-test ]; then
/usr/local/bin/ngsi-test -verbose "$1"
Expand Down
2 changes: 1 addition & 1 deletion e2e/script/docker-compose-up.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
set -ue
echo "{"serviceMappings":[]}" > ./config/cygnus-name_mappings.conf
docker-compose up -d
docker compose up -d
6 changes: 5 additions & 1 deletion script/e2e-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,13 @@ if [ -e e2e-test.sh ]; then
cd ..
fi

if [ -e ./bin/ngsi ]; then
rm -f ./bin/ngsi
fi

make build
cd e2e
if [ ! "$(docker-compose ps -a | wc -l)" = "2" ]; then
if [ ! "$(docker compose ps -a | wc -l)" = "2" ]; then
make down
fi
make build
Expand Down

0 comments on commit af2b4f7

Please sign in to comment.