Skip to content

Release Testing

Erik Jaegervall (Jägervall) edited this page Nov 8, 2024 · 5 revisions

This page intends to list the tests that we shall/must do before we do a release for this repository. The intention of the release test is to do a reasonable regression test for components listed as Beta/Production/Stable/Mature in the KUKSA Component Maturity Overview. It is assumed that new features of individual components have been thoroughly tested, the focus of the release test is to verify that there are no regressions. For capacity reasons the tests have no intention to cover all possible use cases.

Prerequisites

  • No outstanding Pull Requests that may affect component behavior.
  • CI Docker builds on latest master has succeeded
  • Pre-release of kuksa-client exists on PyPI

Basic testing with Databroker (Insecure, No TLS)

erik@debian3:~/kuksa.val/kuksa_databroker$ cargo run --bin databroker -- --metadata ../data/vss-core/vss_release_4.0.json --insecure

Python Client test

(kuksa-client) erik@debian3:~/kuksa.val/kuksa-client$ kuksa-client grpc://127.0.0.1:55555


Test Client> setValue Vehicle.Speed 33
OK

Test Client> getValue Vehicle.Speed

Kuksa-client

Verify with Kuksa-client that connection works

erik@debian4:~/kuksa-python-sdk/kuksa-client$ kuksa-client grpcs://127.0.0.1:55555 --cacertificate /home/erik/kuksa-common/tls/CA.pem --tls-server-name Server

     ⢀⣤⣶⣾⣿⢸⣿⣿⣷⣶⣤⡀
    ⣴⣿⡿⠋⣿⣿   ⠈⠙⢿⣿⣦
   ⣾⣿⠋  ⣿⣿  ⣶⣿  ⠙⣿⣷
  ⣸⣿⠇   ⣿⣿⠠⣾⡿⠃   ⠸⣿⣇  ⣶ ⣠⡶⠂ ⣶  ⢰⡆ ⢰⡆⢀⣴⠖ ⢠⡶⠶⠶⡦   ⣰⣶⡀
  ⣿⣿    ⠿⢿⣷⣦⡀     ⣿⣿  ⣿⢾⣏   ⣿  ⢸⡇ ⢸⡷⣿⡁  ⠘⠷⠶⠶⣦  ⢠⡟⠘⣷
  ⢹⣿⡆   ⣿⣶⠈⢻⣿⡆   ⢰⣿⡏  ⠿ ⠙⠷⠄ ⠙⠷⠶⠟⠁ ⠸⠇⠈⠻⠦ ⠐⠷⠶⠶⠟ ⠠⠿⠁ ⠹⠧
   ⢿⣿⣄  ⣿⣿  ⠿⣿  ⣠⣿⡿
    ⠻⣿⣷⡄⣿⣿   ⢀⣠⣾⣿⠟    kuksa-client CLI
     ⠈⠛⠇⢿⣿⣿⣿⣿⡿⠿⠛⠁     0.0.0

Default tokens directory: /home/erik/kuksa-python-sdk/submodules/kuksa.val/kuksa_certificates/jwt

Connecting to VSS server at 127.0.0.1 port 55555 using KUKSA GRPC protocol.
TLS will be used.
INFO 2023-11-16 10:36:56,850 kuksa_client.grpc Using TLS with Root CA from /home/erik/kuksa-common/tls/CA.pem
INFO 2023-11-16 10:36:56,855 kuksa_client.grpc Using client private key and certificates, mutual TLS supported if supported by server
INFO 2023-11-16 10:36:56,855 kuksa_client.grpc.aio Establishing secure channel
INFO 2023-11-16 10:36:56,855 kuksa_client.grpc.aio Using TLS server name Server
INFO 2023-11-16 10:36:56,909 kuksa_client.grpc.aio Unauthenticated channel started
Secure gRPC channel connected.


Test Client> authorize /home/erik/kuksa-common/jwt/actuate-provide-all.token 
"Authenticated"

Test Client> setValue Vehicle.Speed 33
OK

Test Client> getValue Vehicle.Speed
{
    "path": "Vehicle.Speed",
    "value": {
        "value": 33.0,
        "timestamp": "2023-11-16T09:37:49.769857+00:00"
    }
}

Databroker Docker

Verify first that Databroker:master is recently built and there is no pending/queued builds.

erik@debian3:~/kuksa.val/kuksa_databroker$ docker pull ghcr.io/eclipse/kuksa.val/databroker:master
erik@debian3:~/kuksa.val/kuksa_databroker$ docker run --rm -it  -p 55555:55555/tcp -v /home/erik/kuksa.val/kuksa_certificates:/certs   ghcr.io/eclipse/kuksa.val/databroker:master --tls-cert /certs/Server.pem --tls-private-key /certs/Server.key --jwt-public-key /certs/jwt/jwt.key.pub

Then repeat test for local build

Kuksa-client (native)

Test as above for TLS + Token

Kuksa-client (Docker)

Note: Verify that correct version is shown!

erik@debian4:~/kuksa-python-sdk/kuksa-client$ docker run --rm -it -v /home/erik/kuksa-common/tls:/tls -v /home/erik/kuksa-common/jwt:/jwt --net=host kuksa-client:latest --cacertificate /tls/CA.pem --tls-server-name Server grpcs://127.0.0.1:55555

     ⢀⣤⣶⣾⣿⢸⣿⣿⣷⣶⣤⡀
    ⣴⣿⡿⠋⣿⣿   ⠈⠙⢿⣿⣦
   ⣾⣿⠋  ⣿⣿  ⣶⣿  ⠙⣿⣷
  ⣸⣿⠇   ⣿⣿⠠⣾⡿⠃   ⠸⣿⣇  ⣶ ⣠⡶⠂ ⣶  ⢰⡆ ⢰⡆⢀⣴⠖ ⢠⡶⠶⠶⡦   ⣰⣶⡀
  ⣿⣿    ⠿⢿⣷⣦⡀     ⣿⣿  ⣿⢾⣏   ⣿  ⢸⡇ ⢸⡷⣿⡁  ⠘⠷⠶⠶⣦  ⢠⡟⠘⣷
  ⢹⣿⡆   ⣿⣶⠈⢻⣿⡆   ⢰⣿⡏  ⠿ ⠙⠷⠄ ⠙⠷⠶⠟⠁ ⠸⠇⠈⠻⠦ ⠐⠷⠶⠶⠟ ⠠⠿⠁ ⠹⠧
   ⢿⣿⣄  ⣿⣿  ⠿⣿  ⣠⣿⡿
    ⠻⣿⣷⡄⣿⣿   ⢀⣠⣾⣿⠟    kuksa-client CLI
     ⠈⠛⠇⢿⣿⣿⣿⣿⡿⠿⠛⠁     0.0.0

Default tokens directory: /kuksa-client/_internal/kuksa_client/kuksa_server_certificates/jwt

Connecting to VSS server at 127.0.0.1 port 55555 using KUKSA GRPC protocol.
TLS will be used.
INFO 2023-11-16 09:43:54,901 kuksa_client.grpc Using TLS with Root CA from /tls/CA.pem
INFO 2023-11-16 09:43:54,902 kuksa_client.grpc Using client private key and certificates, mutual TLS supported if supported by server
INFO 2023-11-16 09:43:54,902 kuksa_client.grpc.aio Establishing secure channel
INFO 2023-11-16 09:43:54,902 kuksa_client.grpc.aio Using TLS server name Server
INFO 2023-11-16 09:43:54,966 kuksa_client.grpc.aio Unauthenticated channel started
Secure gRPC channel connected.
Test Client> authorize /jwt/provide-all.token
"Authenticated"

Test Client> setValue Vehicle.Speed 63
OK

Test Client> getValue Vehicle.Speed
{
    "path": "Vehicle.Speed",
    "value": {
        "value": 63.0,
        "timestamp": "2023-11-16T09:44:11.296047+00:00"
    }
}

Test Client> 

KUKSA Server Docker

docker pull ghcr.io/eclipse/kuksa.val/kuksa-val:master
docker run -it --rm -p 127.0.0.1:8090:8090 -e LOG_LEVEL=ALL ghcr.io/eclipse/kuksa.val/kuksa-val:master

KUKSA-Client (docker or not)

Do as below, checks given as comments with #

erik@debian4:~/kuksa-python-sdk$ docker run --rm -it --net=host kuksa-client:latest wss://127.0.0.1:8090

     ⢀⣤⣶⣾⣿⢸⣿⣿⣷⣶⣤⡀
    ⣴⣿⡿⠋⣿⣿   ⠈⠙⢿⣿⣦
   ⣾⣿⠋  ⣿⣿  ⣶⣿  ⠙⣿⣷
  ⣸⣿⠇   ⣿⣿⠠⣾⡿⠃   ⠸⣿⣇  ⣶ ⣠⡶⠂ ⣶  ⢰⡆ ⢰⡆⢀⣴⠖ ⢠⡶⠶⠶⡦   ⣰⣶⡀
  ⣿⣿    ⠿⢿⣷⣦⡀     ⣿⣿  ⣿⢾⣏   ⣿  ⢸⡇ ⢸⡷⣿⡁  ⠘⠷⠶⠶⣦  ⢠⡟⠘⣷
  ⢹⣿⡆   ⣿⣶⠈⢻⣿⡆   ⢰⣿⡏  ⠿ ⠙⠷⠄ ⠙⠷⠶⠟⠁ ⠸⠇⠈⠻⠦ ⠐⠷⠶⠶⠟ ⠠⠿⠁ ⠹⠧
   ⢿⣿⣄  ⣿⣿  ⠿⣿  ⣠⣿⡿
    ⠻⣿⣷⡄⣿⣿   ⢀⣠⣾⣿⠟    kuksa-client CLI
     ⠈⠛⠇⢿⣿⣿⣿⣿⡿⠿⠛⠁     0.4.2.post0+git.10f61d1d.dirty

Default tokens directory: /kuksa-client/_internal/kuksa_client/kuksa_server_certificates/jwt

Connecting to VSS server at 127.0.0.1 port 8090 using VISS protocol.
TLS will be used.
connect to wss://127.0.0.1:8090
Websocket connected. Negotiated subprotocol None

Test Client> authorize /kuksa-client/_internal/kuksa_client/kuksa_server_certificates/jwt/super-admin.json.token 
{
  "TTL": 1767225599,
  "action": "authorize",
  "requestId": "f94ca2a2-6133-4f0a-b8b1-39ce6ee07a99",
  "ts": "2023-11-16T10:04:02.1700129042Z"
}

Test Client> setValue Vehicle.Speed 5
{
  "action": "set",
  "requestId": "6c6ac3df-6be9-4e9d-b216-f21a7e455416",
  "ts": "2023-11-16T10:04:14.1700129054Z"
}

Test Client> getValue Vehicle.Speed  
{
  "action": "get",
  "data": {
    "dp": {
      "ts": "2023-11-16T10:04:14.173862849Z",
      "value": "5.0"
    },
    "path": "Vehicle.Speed"
  },
  "requestId": "0ee1fca1-c898-4416-88e5-b578ce988364",
  "ts": "2023-11-16T10:04:21.1700129061Z"
}


Test after creating new kuksa-client PyPI package (TLS, token)

Start databroker as above. Install kuksa-client and run it. Make sure you do not run from the directory where kuksa-client resides

erik@debian3:~$ pip install -U kuksa-client
...
Successfully installed kuksa-client-0.4.0

erik@debian3:~$ kuksa-client --ip 127.0.0.1 --port 55555 --protocol grpc  --cacertificate kuksa.val/kuksa_certificates/CA.pem --tls-server-name Server  
...
Welcome to Kuksa Client version 0.4.0
Test Client> authorize kuksa.val/jwt/provide-all.token 
"Authenticated"

Test Client> setValue Vehicle.Speed 43
OK

Test Client> getValue Vehicle.Speed   
{
    "path": "Vehicle.Speed",
    "value": {
        "value": 43.0,
        "timestamp": "2023-07-26T09:21:14.432932+00:00"
    }
}

Test Client> 

Tests after creating new docker containers on ghcr.io

In general, download containers:

docker pull ghcr.io/eclipse/kuksa.val/databroker:0.4

Databroker

erik@debian3:~/kuksa.val/kuksa_databroker$ docker run --rm -it  -p 55555:55555/tcp -v /home/erik/kuksa.val/kuksa_certificates:/certs ghcr.io/eclipse/kuksa.val/databroker:0.4 --tls-cert /certs/Server.pem --tls-private-key /certs/Server.key

Test with Python Client and CLI. Check that correct version is shown

erik@debian3:~/kuksa.val$ docker run --rm -it --net=host -v /home/erik/kuksa.val/kuksa_certificates:/certs ghcr.io/eclipse/kuksa.val/kuksa-client:0.4  --ip 127.0.0.1 --port 55555 --protocol grpc --cacertificate /certs/CA.pem --tls-server-name Server 
Welcome to Kuksa Client version 0.4.0

Secure gRPC channel connected.
Test Client> setValue Vehicle.Speed 3
OK

Test Client> getValue Vehicle.Speed
{
    "path": "Vehicle.Speed",
    "value": {
        "value": 3.0,
        "timestamp": "2023-07-27T07:56:44.898774+00:00"
    }
}

And Databroker CLI

erik@debian3:~/kuksa.val$ docker run --rm -it --net=host -v /home/erik/kuksa.val/kuksa_certificates:/certs -v /home/erik/kuksa.val/jwt:/jwt   ghcr.io/eclipse/kuksa.val/databroker-cli:master --token-file /jwt/provide-all.token --ca-cert /certs/CA.pem

  ⠀⠀⠀⢀⣤⣶⣾⣿⢸⣿⣿⣷⣶⣤⡀
  ⠀⠀⣴⣿⡿⠋⣿⣿⠀⠀⠀⠈⠙⢿⣿⣦⠀
  ⠀⣾⣿⠋⠀⠀⣿⣿⠀⠀⣶⣿⠀⠀⠙⣿⣷   
  ⣸⣿⠇⠀⠀⠀⣿⣿⠠⣾⡿⠃⠀⠀⠀⠸⣿⣇⠀⠀⣶⠀⣠⡶⠂⠀⣶⠀⠀⢰⡆⠀⢰⡆⢀⣴⠖⠀⢠⡶⠶⠶⡦⠀⠀⠀⣰⣶⡀
  ⣿⣿⠀⠀⠀⠀⠿⢿⣷⣦⡀⠀⠀⠀⠀⠀⣿⣿⠀⠀⣿⢾⣏⠀⠀⠀⣿⠀⠀⢸⡇⠀⢸⡷⣿⡁⠀⠀⠘⠷⠶⠶⣦⠀⠀⢠⡟⠘⣷
  ⢹⣿⡆⠀⠀⠀⣿⣶⠈⢻⣿⡆⠀⠀⠀⢰⣿⡏⠀⠀⠿⠀⠙⠷⠄⠀⠙⠷⠶⠟⠁⠀⠸⠇⠈⠻⠦⠀⠐⠷⠶⠶⠟⠀⠠⠿⠁⠀⠹⠧
  ⠀⢿⣿⣄⠀⠀⣿⣿⠀⠀⠿⣿⠀⠀⣠⣿⡿
  ⠀⠀⠻⣿⣷⡄⣿⣿⠀⠀⠀⢀⣠⣾⣿⠟    databroker-cli                
  ⠀⠀⠀⠈⠛⠇⢿⣿⣿⣿⣿⡿⠿⠛⠁     v0.4.0                        

Successfully connected to http://127.0.0.1:55555/
sdv.databroker.v1 > 

Server

docker run -it --rm -p 127.0.0.1:8090:8090 -e LOG_LEVEL=ALL ghcr.io/eclipse/kuksa.val/kuksa-val:0.4.1

docker run --rm -it --net=host -v /home/erik/kuksa.val/kuksa_certificates:/certs ghcr.io/eclipse/kuksa.val/kuksa-client:0.4.1 wss://127.0.0.1:8090 --cacertificate /certs/CA.pem --tls-server-name Server