Skip to content

Commit

Permalink
Fix test run scripts. (#3088)
Browse files Browse the repository at this point in the history
  • Loading branch information
orsenthil authored Oct 24, 2024
1 parent 0703d03 commit ed8e3f8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
4 changes: 1 addition & 3 deletions scripts/lib/canary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@

SECONDS=0

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
source "$SCRIPT_DIR"/set_kubeconfig.sh

source "$SCRIPT_DIR"/lib/set_kubeconfig.sh

echo "Running tests for amazon-vpc-cni-k8s with the following variables
KUBECONFIG: $KUBECONFIG
Expand Down
4 changes: 1 addition & 3 deletions scripts/lib/cluster.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/usr/bin/env bash

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
source "$SCRIPT_DIR"/set_kubeconfig.sh

source "$SCRIPT_DIR"/lib/set_kubeconfig.sh

function load_cluster_details() {
echo "loading cluster details $CLUSTER_NAME"
Expand Down
2 changes: 1 addition & 1 deletion scripts/lib/performance_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function check_for_slow_performance() {

# Divided by 3 to get current average, multiply past averages by 5/4 to get 25% window
# Checks if current average is greater than or equal to 15 seconds to avoid failing due to fast previous runs
if [[$((CURRENT_DURATION_UP_SUM / 3)) -ge 15] && [ $((CURRENT_DURATION_UP_SUM / 3)) -gt $((PAST_PERFORMANCE_UP_AVERAGE * 5 / 4)) ]]; then
if [[ $((CURRENT_DURATION_UP_SUM / 3)) -ge 15 ]] && [[ $((CURRENT_DURATION_UP_SUM / 3)) -gt $((PAST_PERFORMANCE_UP_AVERAGE * 5 / 4)) ]]; then
echo "FAILURE! Performance test pod UPPING took >25% longer than the past three tests"
echo "This tests time: $((CURRENT_DURATION_UP_SUM / 3))"
echo "Previous tests' time: ${PAST_PERFORMANCE_UP_AVERAGE}"
Expand Down

0 comments on commit ed8e3f8

Please sign in to comment.