E2E: Rename end-to-end-tests-server to grafana-server (#44249)
* Rename to grafana-server / move scripts into new directory * Change grafana-server step command * Change scripts paths * Use test grabpl version * Update run-suite script * Further name updates * Update grabpl version * Update contribute/style-guides/e2e-core.md Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com> Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>
This commit is contained in:
co-authored by
Maria Alexandra
parent
9ccc7ec76e
commit
22eb2df602
@@ -1,2 +0,0 @@
|
||||
[feature_toggles]
|
||||
enable =
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
. e2e/variables
|
||||
|
||||
if [ -f "$PIDFILE" ]; then
|
||||
echo -e "Found pidfile, killing running grafana-server"
|
||||
kill -9 `cat $PIDFILE`
|
||||
rm $PIDFILE
|
||||
fi
|
||||
|
||||
rm -rf e2e/tmp
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -xeo pipefail
|
||||
|
||||
. e2e/variables
|
||||
. scripts/grafana-server/variables
|
||||
|
||||
if ((BASH_VERSINFO[0] < 4)); then
|
||||
echo "Bash ver >= 4 is needed to run this script"
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
. e2e/variables
|
||||
. scripts/grafana-server/variables
|
||||
|
||||
if [ "$BASE_URL" != "" ]; then
|
||||
echo -e "BASE_URL set, skipping starting server"
|
||||
else
|
||||
# Start it in the background
|
||||
./e2e/start-server 2>&1 > e2e/server.log &
|
||||
./e2e/wait-for-grafana
|
||||
./scripts/grafana-server/start-server 2>&1 > scripts/grafana-server/server.log &
|
||||
./scripts/grafana-server/wait-for-grafana
|
||||
fi
|
||||
|
||||
./e2e/run-suite "$@"
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
. e2e/variables
|
||||
|
||||
PORT=${PORT:-$DEFAULT_PORT}
|
||||
PACKAGE_FILE=${PACKAGE_FILE:-$DEFAULT_PACKAGE_FILE}
|
||||
|
||||
./e2e/kill-server
|
||||
|
||||
mkdir $RUNDIR
|
||||
|
||||
echo -e "Copying grafana backend files to temp dir..."
|
||||
|
||||
# Expand any wildcards
|
||||
pkgs=(${PACKAGE_FILE})
|
||||
pkg=${pkgs[0]}
|
||||
if [[ -f ${pkg} ]]; then
|
||||
echo "Found package tar file ${pkg}, extracting..."
|
||||
tar zxf ${pkg} -C $RUNDIR
|
||||
mv $RUNDIR/grafana-*/* $RUNDIR
|
||||
else
|
||||
echo "Couldn't find package ${PACKAGE_FILE} - copying local dev files"
|
||||
|
||||
if [[ ! -f bin/grafana-server ]]; then
|
||||
echo bin/grafana-server missing
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cp -r ./bin $RUNDIR
|
||||
cp -r ./public $RUNDIR
|
||||
cp -r ./tools $RUNDIR
|
||||
|
||||
mkdir $RUNDIR/conf
|
||||
mkdir $PROV_DIR
|
||||
mkdir $PROV_DIR/datasources
|
||||
mkdir $PROV_DIR/dashboards
|
||||
|
||||
cp ./e2e/custom.ini $RUNDIR/conf/custom.ini
|
||||
cp ./conf/defaults.ini $RUNDIR/conf/defaults.ini
|
||||
fi
|
||||
|
||||
echo -e "Copy provisioning setup from devenv"
|
||||
|
||||
cp devenv/datasources.yaml $PROV_DIR/datasources
|
||||
cp devenv/dashboards.yaml $PROV_DIR/dashboards
|
||||
|
||||
cp -r devenv $RUNDIR
|
||||
|
||||
echo -e "Starting Grafana Server port $PORT"
|
||||
|
||||
$RUNDIR/bin/grafana-server \
|
||||
--homepath=$HOME_PATH \
|
||||
--pidfile=$RUNDIR/pid \
|
||||
cfg:server.http_port=$PORT \
|
||||
cfg:server.router_logging=1 \
|
||||
cfg:app_mode=development
|
||||
|
||||
# 2>&1 > $RUNDIR/output.log &
|
||||
# cfg:log.level=debug \
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
DEFAULT_RUNDIR=e2e/tmp
|
||||
RUNDIR=${RUNDIR:-$DEFAULT_RUNDIR}
|
||||
HOME_PATH=$PWD/$RUNDIR
|
||||
PIDFILE=$RUNDIR/pid
|
||||
DEFAULT_PACKAGE_FILE=dist/grafana-*linux-amd64.tar.gz
|
||||
PROV_DIR=$RUNDIR/conf/provisioning
|
||||
DEFAULT_HOST=localhost
|
||||
DEFAULT_PORT=3001
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
. e2e/variables
|
||||
. scripts/grafana-server/variables
|
||||
|
||||
./e2e/run-suite verify/specs
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
. e2e/variables
|
||||
|
||||
HOST=${HOST:-$DEFAULT_HOST}
|
||||
PORT=${PORT:-$DEFAULT_PORT}
|
||||
|
||||
echo -e "Waiting for grafana-server to finish starting, host=$HOST, port=$PORT"
|
||||
|
||||
timeout 60 bash -c 'until nc -z $0 $1; do sleep 1; done' $HOST $PORT
|
||||
Reference in New Issue
Block a user