Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 30 additions & 3 deletions .github/workflows/run-cli-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ on:
types: [opened, synchronize]
workflow_dispatch:
workflow_call:


jobs:
test:
runs-on: ubuntu-latest
name: General E2E Tests

steps:
- uses: actions/checkout@v6
Expand All @@ -27,9 +27,36 @@ jobs:
repository: infisical/infisical
path: infisical
- name: Test with the Go CLI
run: go test -v -timeout 30m -count=1 github.com/infisical/cli/e2e-tests/...
run: go test -v -timeout 30m -count=1 github.com/infisical/cli/e2e-tests/proxy github.com/infisical/cli/e2e-tests/relay
working-directory: ./e2e
env:
INFISICAL_BACKEND_DIR: ${{ github.workspace }}/infisical/backend
INFISICAL_CLI_EXECUTABLE: ${{ github.workspace }}/infisical-cli
CLI_E2E_DEFAULT_RUN_METHOD: subprocess
CLI_E2E_DEFAULT_RUN_METHOD: subprocess

agent-test:
runs-on: ubuntu-latest
name: Agent E2E Tests

steps:
- uses: actions/checkout@v6
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version: "1.25.2"
- name: Install dependencies
run: go get .
- name: Build the CLI
run: go build -o infisical-cli
- name: Checkout infisical repo
uses: actions/checkout@v6
with:
repository: infisical/infisical
path: infisical
- name: Test Certificate Agent
run: go test -v -timeout 30m -count=1 github.com/infisical/cli/e2e-tests/agent
working-directory: ./e2e
env:
INFISICAL_BACKEND_DIR: ${{ github.workspace }}/infisical/backend
INFISICAL_CLI_EXECUTABLE: ${{ github.workspace }}/infisical-cli
CLI_E2E_DEFAULT_RUN_METHOD: subprocess
16 changes: 16 additions & 0 deletions e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,26 @@ cd e2e
go test github.com/infisical/cli/e2e-tests/relay
```

To run the cert-manager agent tests:

```bash
cd e2e
go test github.com/infisical/cli/e2e-tests/agent
```

Some tests (e.g. certificate renewal) may take longer to complete. If you experience timeouts, you can increase the Go test timeout using the `-timeout` flag:

```bash
cd e2e
go test github.com/infisical/cli/e2e-tests/agent -timeout 30m
```

If you're using a `.env` file (recommended), just make sure it's configured and run the tests:

```bash
cd e2e
go test github.com/infisical/cli/e2e-tests/relay
go test github.com/infisical/cli/e2e-tests/agent
```

Alternatively, you can export environment variables manually:
Expand All @@ -165,6 +180,7 @@ export INFISICAL_CLI_EXECUTABLE=/path/to/infisical-merge
export INFISICAL_BACKEND_DIR=/path/to/infisical/backend
cd e2e
go test github.com/infisical/cli/e2e-tests/relay
go test github.com/infisical/cli/e2e-tests/agent
```

**Tip:** Using a `.env` file is much more convenient than exporting variables manually. See the [Environment Variables Configuration](#environment-variables-configuration) section above for details.
Expand Down
Loading
Loading