Skip to content

Commit 67a9464

Browse files
committed
Update
1 parent b125af9 commit 67a9464

6 files changed

+92
-34
lines changed

controllers/argocd_metrics_controller_test.go

+3-4
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import (
3030
corev1 "k8s.io/api/core/v1"
3131
rbacv1 "k8s.io/api/rbac/v1"
3232
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
33-
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
3433
"k8s.io/apimachinery/pkg/runtime"
3534
"k8s.io/apimachinery/pkg/types"
3635
"k8s.io/client-go/kubernetes/scheme"
@@ -54,12 +53,12 @@ const (
5453

5554
func newClient(s *runtime.Scheme, namespace, name string) client.Client {
5655
ns := corev1.Namespace{
57-
ObjectMeta: v1.ObjectMeta{
56+
ObjectMeta: metav1.ObjectMeta{
5857
Name: namespace,
5958
},
6059
}
6160
argocd := argoapp.ArgoCD{
62-
ObjectMeta: v1.ObjectMeta{
61+
ObjectMeta: metav1.ObjectMeta{
6362
Name: name,
6463
Namespace: namespace,
6564
},
@@ -295,7 +294,7 @@ func TestReconciler_add_dashboard(t *testing.T) {
295294

296295
// Need to create openshift-config-managed namespace for dashboards
297296
ns := corev1.Namespace{
298-
ObjectMeta: v1.ObjectMeta{
297+
ObjectMeta: metav1.ObjectMeta{
299298
Name: dashboardNamespace,
300299
},
301300
}

controllers/gitopsservice_controller_test.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ import (
3838
"k8s.io/apimachinery/pkg/api/errors"
3939
resourcev1 "k8s.io/apimachinery/pkg/api/resource"
4040
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
41-
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
4241
"k8s.io/apimachinery/pkg/runtime"
4342
"k8s.io/apimachinery/pkg/types"
4443
"k8s.io/client-go/kubernetes/scheme"
@@ -499,7 +498,7 @@ func TestReconcile_testArgoCDForOperatorUpgrade(t *testing.T) {
499498

500499
// Create a basic ArgoCD CR. ArgoCD created by Operator version >= v1.6.0
501500
existingArgoCD := &argoapp.ArgoCD{
502-
ObjectMeta: v1.ObjectMeta{
501+
ObjectMeta: metav1.ObjectMeta{
503502
Name: serviceNamespace,
504503
Namespace: serviceNamespace,
505504
},

go.mod

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/redhat-developer/gitops-operator
33
go 1.20
44

55
require (
6-
github.com/argoproj-labs/argo-rollouts-manager v0.0.2-0.20230515023837-0632f3e856d5
6+
github.com/argoproj-labs/argo-rollouts-manager v0.0.2-0.20240221054348-027faa92ffdb
77
github.com/argoproj-labs/argocd-operator v0.9.0-rc1
88
github.com/coreos/prometheus-operator v0.40.0
99
github.com/go-logr/logr v1.2.4
@@ -27,6 +27,7 @@ require (
2727

2828
require (
2929
github.com/argoproj/argo-cd/v2 v2.9.2 // indirect
30+
github.com/argoproj/argo-rollouts v1.6.6 // indirect
3031
github.com/beorn7/perks v1.0.1 // indirect
3132
github.com/blang/semver/v4 v4.0.0 // indirect
3233
github.com/cespare/xxhash/v2 v2.2.0 // indirect
@@ -124,3 +125,5 @@ replace (
124125
k8s.io/sample-cli-plugin => k8s.io/sample-cli-plugin v0.28.3
125126
k8s.io/sample-controller => k8s.io/sample-controller v0.28.3
126127
)
128+
129+
// replace github.com/argoproj-labs/argo-rollouts-manager => ../argo-rollouts-manager

go.sum

+5-3
Original file line numberDiff line numberDiff line change
@@ -637,12 +637,14 @@ github.com/apache/arrow/go/v11 v11.0.0/go.mod h1:Eg5OsL5H+e299f7u5ssuXsuHQVEGC4x
637637
github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
638638
github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
639639
github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU=
640-
github.com/argoproj-labs/argo-rollouts-manager v0.0.2-0.20230515023837-0632f3e856d5 h1:SlFbeNb42H7DUGzE9B/uYYjlQjNSR4y+eaWiTqN3PGs=
641-
github.com/argoproj-labs/argo-rollouts-manager v0.0.2-0.20230515023837-0632f3e856d5/go.mod h1:AiEjAr6e/DCDiicjoC7W7LaZdO28sfgoBhjbGryzEZ8=
640+
github.com/argoproj-labs/argo-rollouts-manager v0.0.2-0.20240221054348-027faa92ffdb h1:Tza/PynlSFFI4twCW1INWjzU8aCjYMJ0mtoQLQGMsrY=
641+
github.com/argoproj-labs/argo-rollouts-manager v0.0.2-0.20240221054348-027faa92ffdb/go.mod h1:r6/vgsXjS3ZdzfrP8QyDHtoFoKXLbVUIndkPeMzHJGc=
642642
github.com/argoproj-labs/argocd-operator v0.9.0-rc1 h1:1iPeIHSZWva/z3h+EWps9GJdH27t6GbWiN3sKTn4rTg=
643643
github.com/argoproj-labs/argocd-operator v0.9.0-rc1/go.mod h1:vypqFDqVCcJXK4xFV4XQrCGRlHHWl8YsjKuuRMgATRY=
644644
github.com/argoproj/argo-cd/v2 v2.9.2 h1:WJFLZOESdrigOcj8ttUEllJDffkcdrj2k8aJQIu+TLc=
645645
github.com/argoproj/argo-cd/v2 v2.9.2/go.mod h1:+Ve37mJedhW4fpRTpQNbE9VaSmkijET1UgxZOFNi3dI=
646+
github.com/argoproj/argo-rollouts v1.6.6 h1:JCJ0cGAwWkh2xCAHZ1OQmrobysRjCatmG9IZaLJpS1g=
647+
github.com/argoproj/argo-rollouts v1.6.6/go.mod h1:X2kTiBaYCSounmw1kmONdIZTwJNzNQYC0SrXUgSw9UI=
646648
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
647649
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
648650
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
@@ -1633,8 +1635,8 @@ github.com/rogpeppe/go-internal v1.4.0/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTE
16331635
github.com/rogpeppe/go-internal v1.5.0/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
16341636
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
16351637
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
1636-
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
16371638
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
1639+
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
16381640
github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
16391641
github.com/rubenv/sql-migrate v0.0.0-20200212082348-64f95ea68aa3/go.mod h1:rtQlpHw+eR6UrqaS3kX1VYeaCxzCVdimDS7g5Ln4pPc=
16401642
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=

scripts/openshiftci-presubmit-all-tests.sh

+34-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,37 @@ chmod 640 $TMP_DIR/kubeconfig
2525
export KUBECONFIG=$TMP_DIR/kubeconfig
2626

2727
# Run e2e test
28-
make test-e2e
28+
29+
# source $(dirname $0)/e2e-common.sh
30+
31+
# # Ensuring proper installation
32+
# pod=openshift-gitops-operator-controller-manager && oc get pods `oc get pods --all-namespaces | grep $pod | head -1 | awk '{print $2}'` -n openshift-gitops-operator -o yaml
33+
34+
# subscription=gitops-operator- && oc get subscription `oc get subscription --all-namespaces | grep $subscription | head -1 | awk '{print $2}'` -n openshift-gitops-operator
35+
36+
# oc wait --for=condition=Ready -n openshift-gitops pod --timeout=15m -l 'app.kubernetes.io/name in (cluster,kam,openshift-gitops-application-controller,openshift-gitops-applicationset-controller,openshift-gitops-dex-server,openshift-gitops-redis,openshift-gitops-repo-server,openshift-gitops-server)'
37+
38+
39+
40+
41+
42+
# ROLLOUTS_TMP_DIR=$(mktemp -d)
43+
44+
# cd $ROLLOUTS_TMP_DIR
45+
46+
# kubectl get namespaces
47+
48+
# kubectl get pods -A || true
49+
50+
# kubectl api-resources
51+
52+
# git clone https://github.com/argoproj-labs/argo-rollouts-manager
53+
54+
# cd "$ROLLOUTS_TMP_DIR/argo-rollouts-manager"
55+
56+
# TARGET_ROLLOUT_MANAGER_COMMIT=027faa92ffdbc43a02eca3982f020a8c391fd340
57+
58+
# git checkout $TARGET_ROLLOUT_MANAGER_COMMIT
59+
60+
# make install generate fmt vet
61+
make test-e2e

scripts/run-kuttl-tests.sh

+45-23
Original file line numberDiff line numberDiff line change
@@ -109,27 +109,49 @@ trap cleanup EXIT
109109
# Handle ctrl+c
110110
trap unexpectedError INT
111111

112-
mkdir -p $WORK_DIR/results || exit 1
113-
mkdir -p $DIR/results || exit 1
114-
115-
case "$testsuite" in
116-
"parallel")
117-
header "Running $testsuite tests"
118-
run_parallel $2
119-
;;
120-
"sequential")
121-
header "Running $testsuite tests"
122-
run_sequential $2
123-
;;
124-
"all")
125-
header "Running $testsuite tests"
126-
run_parallel
127-
run_sequential
128-
;;
129-
*)
130-
echo "USAGE: $0 (parallel|sequential|all)" >&2
131-
exit 1
132-
esac
133112

134-
(( failed )) && fail_test "$testsuite tests failed"
135-
success $testsuite
113+
114+
ROLLOUTS_TMP_DIR=$(mktemp -d)
115+
116+
cd $ROLLOUTS_TMP_DIR
117+
118+
kubectl get namespaces
119+
120+
kubectl get pods -A || true
121+
122+
kubectl api-resources
123+
124+
git clone https://github.com/argoproj-labs/argo-rollouts-manager
125+
126+
cd "$ROLLOUTS_TMP_DIR/argo-rollouts-manager"
127+
128+
TARGET_ROLLOUT_MANAGER_COMMIT=027faa92ffdbc43a02eca3982f020a8c391fd340
129+
130+
git checkout $TARGET_ROLLOUT_MANAGER_COMMIT
131+
make test-e2e
132+
133+
134+
# mkdir -p $WORK_DIR/results || exit 1
135+
# mkdir -p $DIR/results || exit 1
136+
137+
# case "$testsuite" in
138+
# "parallel")
139+
# header "Running $testsuite tests"
140+
# run_parallel $2
141+
# ;;
142+
# "sequential")
143+
# header "Running $testsuite tests"
144+
# run_sequential $2
145+
# ;;
146+
# "all")
147+
# header "Running $testsuite tests"
148+
# run_parallel
149+
# run_sequential
150+
# ;;
151+
# *)
152+
# echo "USAGE: $0 (parallel|sequential|all)" >&2
153+
# exit 1
154+
# esac
155+
156+
# (( failed )) && fail_test "$testsuite tests failed"
157+
# success $testsuite

0 commit comments

Comments
 (0)