-
Notifications
You must be signed in to change notification settings - Fork 174
Expand file tree
/
Copy pathsensor.sh
More file actions
executable file
·50 lines (38 loc) · 1.35 KB
/
sensor.sh
File metadata and controls
executable file
·50 lines (38 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/env bash
# shellcheck disable=SC1091
set -euo pipefail
# Runs sensor integration tests.
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")"/../.. && pwd)"
# shellcheck source=../../scripts/lib.sh
source "$ROOT/scripts/lib.sh"
# shellcheck source=../../scripts/ci/sensor-wait.sh
source "$ROOT/scripts/ci/sensor-wait.sh"
# shellcheck source=../../tests/scripts/setup-certs.sh
source "$ROOT/tests/scripts/setup-certs.sh"
# shellcheck source=../../tests/e2e/lib.sh
source "$ROOT/tests/e2e/lib.sh"
# shellcheck source=../../tests/e2e/run.sh
source "$ROOT/tests/e2e/run.sh"
test_sensor() {
info "Starting sensor integration tests"
require_environment "KUBECONFIG"
export_test_environment
export SENSOR_HELM_DEPLOY=true
export ROX_ACTIVE_VULN_REFRESH_INTERVAL=1m
export ROX_NETPOL_FIELDS=true
test_preamble
setup_deployment_env false false
# shellcheck disable=SC2119
remove_existing_stackrox_resources
rm -f FAIL
info "Sensor k8s integration tests"
make sensor-integration-test || touch FAIL
info "Saving junit XML report"
make generate-junit-reports || touch FAIL
store_test_results junit-reports reports
store_test_results "test-output/test.log" "sensor-integration"
[[ ! -f FAIL ]] || die "sensor-integration e2e tests failed"
}
if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
test_sensor "$*"
fi