Skip to content

Commit d0f1678

Browse files
authored
chore(tests): Remove old e2e tests and rename e2e2 to e2e (#504)
Signed-off-by: jannfis <[email protected]>
1 parent d7ee858 commit d0f1678

26 files changed

+38
-516
lines changed

.github/workflows/ci.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,16 +188,16 @@ jobs:
188188
go mod download
189189
- name: Set up the test environment
190190
run: |
191-
make setup-e2e2
191+
make setup-e2e
192192
- name: Run the principal and agents
193193
run: |
194194
make all
195-
make start-e2e2 2>&1 | sed -r "s/[[:cntrl:]]\[[0-9]{1,3}m//g" | tee /tmp/e2e-argocd-agent.log &
195+
make start-e2e 2>&1 | sed -r "s/[[:cntrl:]]\[[0-9]{1,3}m//g" | tee /tmp/e2e-argocd-agent.log &
196196
sleep 10
197197
- name: Run the e2e tests
198198
run: |
199199
set -o pipefail
200-
make test-e2e2 2>&1 | tee /tmp/test-e2e.log
200+
make test-e2e 2>&1 | tee /tmp/test-e2e.log
201201
goreman run stop-all || echo "goreman trouble"
202202
sleep 30
203203
- name: Create Argo CD logs

Makefile

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,29 +45,25 @@ fmt:
4545
.PHONY: build
4646
build: argocd-agent cli
4747

48-
.PHONY: setup-e2e2
49-
setup-e2e2: cli
48+
.PHONY: setup-e2e
49+
setup-e2e: cli
5050
./hack/dev-env/setup-vcluster-env.sh create
5151
./hack/dev-env/gen-creds.sh
5252
./hack/dev-env/create-agent-config.sh
5353

54-
.PHONY: start-e2e2
55-
start-e2e2: cli install-goreman
56-
./hack/dev-env/start-e2e2.sh
54+
.PHONY: start-e2e
55+
start-e2e: cli install-goreman
56+
./hack/dev-env/start-e2e.sh
5757

58-
.PHONY: test-e2e2
59-
test-e2e2:
58+
.PHONY: test-e2e
59+
test-e2e:
6060
./test/run-e2e.sh
6161

6262
.PHONY: test
6363
test:
6464
mkdir -p test/out
6565
./hack/test.sh
6666

67-
.PHONY: test-e2e
68-
test-e2e:
69-
go test -race -timeout 60s github.com/argoproj-labs/argocd-agent/test/e2e
70-
7167
.PHONY: mod-vendor
7268
mod-vendor:
7369
go mod vendor

hack/dev-env/reverse-tunnel/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ To enable the configuration:
2020

2121
```
2222
# Setup environment as usual
23-
make setup-e2e2
23+
make setup-e2e
2424
2525
# Installs Rathole Deployment/Services on vcluster, update 'managed-agent' cluster Secret to point to Rathole Deployment, and start local rathole container
2626
./hack/dev-env/reverse-tunnel/setup.sh
@@ -31,14 +31,14 @@ To test the configuration:
3131

3232
```
3333
# Start E2E tests
34-
make start-e2e2
34+
make start-e2e
3535
```
3636

3737

3838

3939
### Configuration
4040

41-
Running 'setup-e2e2', followed by 'reverse-tunnel/setup.sh', enables this configuration:
41+
Running 'setup-e2e', followed by 'reverse-tunnel/setup.sh', enables this configuration:
4242

4343

4444
'vcluster-control-plane' vcluster (on k8s cluster):

hack/dev-env/reverse-tunnel/setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ echo ""
145145
echo "* Starting the rathole local client."
146146
echo "* - This may initially report an error while waiting for LoadBalancer service ('Failed to run the control channel: (...): Name or service not known. '), but it will keep trying until connection is established."
147147
echo "* - You can also safely ignore this warning: 'Failed to run the data channel: Failed to read cmd: early eof'"
148-
echo "* - This message indicates you need to run 'make start-e2e2', or that it is not currently running: 'Failed to run the data channel: Failed to connect to 127.0.0.1:6379: Connection refused (os error 111)'"
148+
echo "* - This message indicates you need to run 'make start-e2e', or that it is not currently running: 'Failed to run the data channel: Failed to connect to 127.0.0.1:6379: Connection refused (os error 111)'"
149149
echo ""
150150
echo "CTRL-C / Command-C to terminate rathole tunnel."
151151
$TEMP_DIR/client/run.sh
File renamed without changes.

test/e2e2/README.md renamed to test/e2e/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@ Both the vcluster and Argo CD installations require that LoadBalancer functional
2121
To setup the test environment on the cluster, execute the following command from the repository root:
2222

2323
```shell
24-
make setup-e2e2
24+
make setup-e2e
2525
```
2626

2727
To run the principal and agents, execute the following command from the repository root:
2828

2929
```shell
30-
make start-e2e2
30+
make start-e2e
3131
```
3232

3333
To run the tests, execute the following command from the repository root in a separate terminal instance:
3434

3535
```shell
36-
make test-e2e2
36+
make test-e2e
3737
```
3838

3939
# Writing new end-to-end tests

test/e2e2/appproject_test.go renamed to test/e2e/appproject_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package e2e2
15+
package e2e
1616

1717
import (
1818
"testing"
1919
"time"
2020

21-
"github.com/argoproj-labs/argocd-agent/test/e2e2/fixture"
21+
"github.com/argoproj-labs/argocd-agent/test/e2e/fixture"
2222
argoapp "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1"
2323
"github.com/stretchr/testify/suite"
2424
"k8s.io/apimachinery/pkg/api/errors"

test/e2e2/basic_test.go renamed to test/e2e/basic_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package e2e2
15+
package e2e
1616

1717
import (
1818
"testing"
1919
"time"
2020

21-
"github.com/argoproj-labs/argocd-agent/test/e2e2/fixture"
21+
"github.com/argoproj-labs/argocd-agent/test/e2e/fixture"
2222
argoapp "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1"
2323
"github.com/stretchr/testify/suite"
2424
"k8s.io/apimachinery/pkg/api/errors"

test/e2e2/cache_test.go renamed to test/e2e/cache_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package e2e2
15+
package e2e
1616

1717
import (
1818
"context"
@@ -21,7 +21,7 @@ import (
2121
"testing"
2222
"time"
2323

24-
"github.com/argoproj-labs/argocd-agent/test/e2e2/fixture"
24+
"github.com/argoproj-labs/argocd-agent/test/e2e/fixture"
2525
argoapp "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1"
2626
"github.com/stretchr/testify/require"
2727
"github.com/stretchr/testify/suite"

test/e2e2/clusterinfo_test.go renamed to test/e2e/clusterinfo_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package e2e2
15+
package e2e
1616

1717
import (
1818
"fmt"
1919
"os"
2020
"testing"
2121
"time"
2222

23-
"github.com/argoproj-labs/argocd-agent/test/e2e2/fixture"
23+
"github.com/argoproj-labs/argocd-agent/test/e2e/fixture"
2424
appv1 "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1"
2525
"github.com/stretchr/testify/suite"
2626
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

0 commit comments

Comments
 (0)