-
Notifications
You must be signed in to change notification settings - Fork 211
System Testing
Isaac Beckman edited this page Jul 3, 2019
·
9 revisions
We execute system testing on top of Kubernetes cluster
- locally using Minikube
- on GCE with a single click in the web UI
- on AWS using Kubernetes Operations
Please refer to The official documentation for overview and comparison of different options.
- Install
gcloud
as part of Google Cloud SDK - Make sure you have credentials for GCloud. Run
gcloud auth login
- In order to run API calls, Run
gcloud auth application-default login
-
gcloud config set project
PROJECT_ID (from google cloud console) -
gcloud container clusters get-credentials
CLUSTER_NAME--region
REGION (https://cloud.google.com/sdk/gcloud/reference/container/clusters/get-credentials)
Now you should be able to run kubectl
command to interact with the cluster.
There are 2 options:
-
- Install Python 3.7
- Install pip3
- Install required python libraries ([Requirements](https://github.com/spacemeshos/go-spacemesh/wiki/Python-
required-libraries))
We use pytest framework to run the tests
- Tests are are located in ....
- export ElasticSearch password as environment variable.
- Run
export ES_PASSWD=<YOUR_PASSWORD>
- Run
- Set environment variable:
GOOGLE_APPLICATION_CREDENTIALS
. This environment variable should hold a path to a json file that holds the service account credentials to access google cloud.export GOOGLE_APPLICATION_CREDENTIALS="[PATH]"
- Run
pytest -s -v --tc-file=config.yaml --tc-format=yaml test_bs.py
-
- Expose Environment variables
export GCLOUD_KEY=`cat <GCLOUD_KEY_JSON_PATH> | base64` export PROJECT_NAME=<PROJECT_NAME> export CLUSTER_NAME=<CLUSTER_NAME> export CLUSTER_ZONE=<CLUSTER_ZONE> export ES_PASSWD=<ELASTIC_SEARCH_PASSWORD>
-
Activate service account. Run:
gcloud auth activate-service-account $GCLOUD_EMAIL --key-file <PATH_TO_KEY_FILE>
-
Tests:
- p2p tests: Run
make dockertest-p2p
- mining tests: Run
make dockertest-mining
- hare tests: Run
make dockertests-hare
- sync tests: Run
make dockertests-sync
Run all tests sequencly
make dockerrun-all
- p2p tests: Run
Connect => discord || spacemesh.io || @teamspacemesh || Roadmap || FAQ