Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Baungard Hansen <[email protected]>
  • Loading branch information
jacobbaungard committed Dec 19, 2024
1 parent 728cf45 commit f06a7d1
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 33 deletions.
62 changes: 31 additions & 31 deletions execute_obs_interop_commands.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,48 +21,48 @@ export SKIP_UNINSTALL_STEP=${SKIP_UNINSTALL_STEP:-'true'}
export TAGGING=${TAGGING:-}

if [[ -n ${PARAM_AWS_ACCESS_KEY_ID} ]]; then
export AWS_ACCESS_KEY_ID=${PARAM_AWS_ACCESS_KEY_ID}
export AWS_ACCESS_KEY_ID=${PARAM_AWS_ACCESS_KEY_ID}
fi

if [[ -n ${PARAM_AWS_SECRET_ACCESS_KEY} ]]; then
export AWS_SECRET_ACCESS_KEY=${PARAM_AWS_SECRET_ACCESS_KEY}
export AWS_SECRET_ACCESS_KEY=${PARAM_AWS_SECRET_ACCESS_KEY}
fi

# if [[ ${!USE_MINIO} == "false" ]]; then
# export IS_CANARY_ENV=true
# fi
# fi

export IS_CANARY_ENV=true

if [[ -z ${HUB_CLUSTER_NAME} || -z ${BASE_DOMAIN} || -z ${OC_CLUSTER_USER} || -z ${OC_HUB_CLUSTER_PASS} || -z ${OC_HUB_CLUSTER_API_URL} ]]; then
echo "Aborting test.. OCP HUB details are required for the test execution"
exit 1
echo "Aborting test.. OCP HUB details are required for the test execution"
exit 1
else
if [[ -n ${MANAGED_CLUSTER_USER} && -n ${MANAGED_CLUSTER_PASS} && -n ${MANAGED_CLUSTER_API_URL} ]]; then
oc login --insecure-skip-tls-verify -u $MANAGED_CLUSTER_USER -p $MANAGED_CLUSTER_PASS $MANAGED_CLUSTER_API_URL
oc config view --minify --raw=true > ~/.kube/managed_kubeconfig
export MAKUBECONFIG=~/.kube/managed_kubeconfig
fi
set +x
oc login --insecure-skip-tls-verify -u $OC_CLUSTER_USER -p $OC_HUB_CLUSTER_PASS $OC_HUB_CLUSTER_API_URL
set -x

oc config view --minify --raw=true > userfile
//cat userfile
whoami
rm -rf ~/.kube/config
cp userfile ~/.kube/config
//cat ~/.kube/config
export KUBECONFIG=~/.kube/config
if [[ -n ${MANAGED_CLUSTER_USER} && -n ${MANAGED_CLUSTER_PASS} && -n ${MANAGED_CLUSTER_API_URL} ]]; then
oc login --insecure-skip-tls-verify -u $MANAGED_CLUSTER_USER -p $MANAGED_CLUSTER_PASS $MANAGED_CLUSTER_API_URL
oc config view --minify --raw=true >~/.kube/managed_kubeconfig
export MAKUBECONFIG=~/.kube/managed_kubeconfig
fi
set +x
oc login --insecure-skip-tls-verify -u $OC_CLUSTER_USER -p $OC_HUB_CLUSTER_PASS $OC_HUB_CLUSTER_API_URL
set -x

go mod vendor && ginkgo build ./tests/pkg/tests/
cd tests
cp resources/options.yaml.template resources/options.yaml
/usr/local/bin/yq e -i '.options.hub.name="'"$HUB_CLUSTER_NAME"'"' resources/options.yaml
/usr/local/bin/yq e -i '.options.hub.baseDomain="'"$BASE_DOMAIN"'"' resources/options.yaml
/usr/local/bin/yq e -i '.options.clusters.name="'"$MANAGED_CLUSTER_NAME"'"' resources/options.yaml
/usr/local/bin/yq e -i '.options.clusters.baseDomain="'"$MANAGED_CLUSTER_BASE_DOMAIN"'"' resources/options.yaml
/usr/local/bin/yq e -i '.options.clusters.kubeconfig="'"$MAKUBECONFIG"'"' resources/options.yaml
cat resources/options.yaml
ginkgo --focus=$TAGGING -v pkg/tests/ -- -options=../../resources/options.yaml -v=5
oc config view --minify --raw=true >userfile
//cat userfile
whoami
rm -rf ~/.kube/config
cp userfile ~/.kube/config
//cat ~/.kube/config
export KUBECONFIG=~/.kube/config

go mod vendor && ginkgo build ./tests/pkg/tests/
cd tests
cp resources/options.yaml.template resources/options.yaml
/usr/local/bin/yq e -i '.options.hub.name="'"$HUB_CLUSTER_NAME"'"' resources/options.yaml
/usr/local/bin/yq e -i '.options.hub.baseDomain="'"$BASE_DOMAIN"'"' resources/options.yaml
/usr/local/bin/yq e -i '.options.clusters.name="'"$MANAGED_CLUSTER_NAME"'"' resources/options.yaml
/usr/local/bin/yq e -i '.options.clusters.baseDomain="'"$MANAGED_CLUSTER_BASE_DOMAIN"'"' resources/options.yaml
/usr/local/bin/yq e -i '.options.clusters.kubeconfig="'"$MAKUBECONFIG"'"' resources/options.yaml
cat resources/options.yaml
ginkgo --focus=$TAGGING -v pkg/tests/ -- -options=../../resources/options.yaml -v=5
fi
2 changes: 2 additions & 0 deletions tests/pkg/tests/observability_alert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net/http"
"net/url"
"os"
"os/exec"
"reflect"
"sort"
"strings"
Expand Down
1 change: 0 additions & 1 deletion tests/pkg/tests/observability_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package tests
import (
"context"
"fmt"
"os"
"strings"
"time"

Expand Down
1 change: 0 additions & 1 deletion tests/pkg/tests/observability_uninstall_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package tests
import (
"context"
"errors"
"fmt"
"os"

. "github.com/onsi/ginkgo"
Expand Down

0 comments on commit f06a7d1

Please sign in to comment.