Commit 15fd8497 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Initial try of integration tests

parent 63caa199
Loading
Loading
Loading
Loading
+2
Changes for .gitlab-ci.yml: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ stages:
  - test
  - dependencies
  - deploy
  - integration_test

# include the individual .gitlab-ci.yml of each micro-service
include: 
@@ -11,3 +12,4 @@ include:
  #- local: '/src/monitoring/.gitlab-ci.yml'
  - local: '/src/context/.gitlab-ci.yml'
  - local: '/src/device/.gitlab-ci.yml'
  - local: '/src/integration_tester/.gitlab-ci.yml'
+3
Changes for run_integration_tests.sh: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -5,3 +5,6 @@

#ENDPOINT=($(kubectl --namespace teraflow-development get service contextservice -o 'jsonpath={.spec.clusterIP} {.spec.ports[?(@.name=="grpc")].port}'))
#docker run -it --env TEST_TARGET_ADDRESS=${ENDPOINT[0]} --env TEST_TARGET_PORT=${ENDPOINT[1]} context_service:test


kubectl run integration-test --restart=Never --rm -i --tty --image centos -- /bin/bash
+13
Changes for src/common/tests/Assertions.py: 13 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -28,3 +28,16 @@ def validate_topology(message):
    assert 'topoId' in message
    assert 'device' in message
    assert 'link' in message

def validate_topology_is_empty(message):
    validate_topology(message)
    assert len(message['device']) == 0
    assert len(message['link']) == 0

def validate_topology_has_devices(message):
    validate_topology(message)
    assert len(message['device']) > 0

def validate_topology_has_links(message):
    validate_topology(message)
    assert len(message['link']) > 0
−4

File deleted.

−24

File deleted.

Loading