Files
Xuewei Zhang f9b5e60a43 Add e2e test for NPD
The first test is a very simple test. It installs NPD on a VM, and then
verifies that NPD reports metric host_uptime in Prometheus format.
2019-08-16 01:33:29 -07:00
..
2019-08-16 01:33:29 -07:00
2019-08-16 01:33:29 -07:00
2019-08-16 01:33:29 -07:00

Node Problem Detector End-To-End tests

NPD e2e tests are meant for testing the NPD on a VM environment.

Currently the tests only support Google Compute Engine (GCE) environment. Support for other vendors can be added in future.

Prerequisites

  1. Setup Google Application Default Credentials, which is required for authentication by the Compute Engine API.
  2. Setup a project-wide SSH key that can be used to SSH into the GCE VMs.

Running tests

From the node-problem-detector base directory, run:

export GOOGLE_APPLICATION_CREDENTIALS=[YOUR_ADC_PATH:~/.config/gcloud/application_default_credentials.json]
export ZONE=[ANY_GCE_ZONE:us-central1-a]
export PROJECT=[YOUR_PROJECT_ID]
export VM_IMAGE=[TESTED_OS_IMAGE:cos-73-11647-217-0]
export IMAGE_PROJECT=[TESTED_OS_IMAGE_PROJECT:cos-cloud]
export SSH_USER=${USER}
export SSH_KEY=~/.ssh/id_rsa
make e2e-test