Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
jgwest committed Jun 1, 2024
1 parent 3d9d30d commit f31ccec
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 29 deletions.
7 changes: 3 additions & 4 deletions controllers/argocd_metrics_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import (
corev1 "k8s.io/api/core/v1"
rbacv1 "k8s.io/api/rbac/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/kubernetes/scheme"
Expand All @@ -54,12 +53,12 @@ const (

func newClient(s *runtime.Scheme, namespace, name string, disableMetrics *bool) client.Client {
ns := corev1.Namespace{
ObjectMeta: v1.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Name: namespace,
},
}
argocd := argoapp.ArgoCD{
ObjectMeta: v1.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Name: name,
Namespace: namespace,
},
Expand Down Expand Up @@ -342,7 +341,7 @@ func TestReconciler_add_dashboard(t *testing.T) {

// Need to create openshift-config-managed namespace for dashboards
ns := corev1.Namespace{
ObjectMeta: v1.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Name: dashboardNamespace,
},
}
Expand Down
3 changes: 1 addition & 2 deletions controllers/gitopsservice_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import (
"k8s.io/apimachinery/pkg/api/errors"
resourcev1 "k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/kubernetes/scheme"
Expand Down Expand Up @@ -499,7 +498,7 @@ func TestReconcile_testArgoCDForOperatorUpgrade(t *testing.T) {

// Create a basic ArgoCD CR. ArgoCD created by Operator version >= v1.6.0
existingArgoCD := &argoapp.ArgoCD{
ObjectMeta: v1.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Name: serviceNamespace,
Namespace: serviceNamespace,
},
Expand Down
75 changes: 52 additions & 23 deletions scripts/run-kuttl-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,27 +109,56 @@ trap cleanup EXIT
# Handle ctrl+c
trap unexpectedError INT

mkdir -p $WORK_DIR/results || exit 1
mkdir -p $DIR/results || exit 1

case "$testsuite" in
"parallel")
header "Running $testsuite tests"
run_parallel $2
;;
"sequential")
header "Running $testsuite tests"
run_sequential $2
;;
"all")
header "Running $testsuite tests"
run_parallel
run_sequential
;;
*)
echo "USAGE: $0 (parallel|sequential|all)" >&2
exit 1
esac

(( failed )) && fail_test "$testsuite tests failed"
success $testsuite

ROLLOUTS_TMP_DIR=$(mktemp -d)

cd $ROLLOUTS_TMP_DIR

# kubectl get namespaces

# kubectl get pods -A || true

# kubectl api-resources

git clone https://github.com/argoproj-labs/argo-rollouts-manager

#git clone https://github.com/jgwest/argo-rollouts-manager

cd "$ROLLOUTS_TMP_DIR/argo-rollouts-manager"

TARGET_ROLLOUT_MANAGER_COMMIT=b3e573f0e6ea3a5ec3eeba70ebb5d90e58efcd68

git checkout $TARGET_ROLLOUT_MANAGER_COMMIT
make test-e2e


cd "$ROLLOUTS_TMP_DIR/argo-rollouts-manager"

SKIP_RUN_STEP=true hack/run-upstream-argo-rollouts-e2e-tests.sh


# mkdir -p $WORK_DIR/results || exit 1
# mkdir -p $DIR/results || exit 1

# case "$testsuite" in
# "parallel")
# header "Running $testsuite tests"
# run_parallel $2
# ;;
# "sequential")
# header "Running $testsuite tests"
# run_sequential $2
# ;;
# "all")
# header "Running $testsuite tests"
# run_parallel
# run_sequential
# ;;
# *)
# echo "USAGE: $0 (parallel|sequential|all)" >&2
# exit 1
# esac

# (( failed )) && fail_test "$testsuite tests failed"
# success $testsuite

0 comments on commit f31ccec

Please sign in to comment.