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
42 changes: 38 additions & 4 deletions .github/workflows/run-cli-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ on:
jobs:
test:
runs-on: ubuntu-latest
name: General E2E Tests
name: CLI End-to-End Testing

steps:
- uses: actions/checkout@v6
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version: "1.24.13"
go-version: "1.25.2"
- name: Install dependencies
run: go get .
- name: Build the CLI
Expand All @@ -26,7 +26,6 @@ jobs:
with:
repository: infisical/infisical
path: infisical

- name: Free disk space
run: |
sudo rm -rf /usr/share/dotnet
Expand All @@ -45,7 +44,7 @@ jobs:

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

steps:
- uses: actions/checkout@v6
Expand All @@ -69,3 +68,38 @@ jobs:
INFISICAL_BACKEND_DIR: ${{ github.workspace }}/infisical/backend
INFISICAL_CLI_EXECUTABLE: ${{ github.workspace }}/infisical-cli
CLI_E2E_DEFAULT_RUN_METHOD: subprocess
pam-test:
runs-on: ubuntu-latest
name: PAM End-to-End Testing

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: Free disk space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache/CodeQL
docker system prune -af
df -h
- name: Test PAM Resources
run: go test -v -timeout 30m -count=1 github.com/infisical/cli/e2e-tests/pam
working-directory: ./e2e
env:
INFISICAL_BACKEND_DIR: ${{ github.workspace }}/infisical/backend
INFISICAL_CLI_EXECUTABLE: ${{ github.workspace }}/infisical-cli
CLI_E2E_DEFAULT_RUN_METHOD: subprocess

4 changes: 4 additions & 0 deletions e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,11 @@ If you're using a `.env` file (recommended), just make sure it's configured and
cd e2e
go test github.com/infisical/cli/e2e-tests/relay
go test github.com/infisical/cli/e2e-tests/agent
go test github.com/infisical/cli/e2e-tests/pam
```

**Note:** PAM tests use subprocess mode and require a built CLI binary. Build it first with `go build -o e2e/infisical-merge .` from the repo root.

Alternatively, you can export environment variables manually:

```bash
Expand All @@ -181,6 +184,7 @@ 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
go test github.com/infisical/cli/e2e-tests/pam
```

**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
1 change: 1 addition & 0 deletions e2e/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ require (
github.com/stretchr/testify v1.11.1
github.com/testcontainers/testcontainers-go v0.40.0
github.com/testcontainers/testcontainers-go/modules/compose v0.40.0
github.com/testcontainers/testcontainers-go/modules/postgres v0.40.0
github.com/testcontainers/testcontainers-go/modules/redis v0.40.0
)

Expand Down
4 changes: 4 additions & 0 deletions e2e/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,8 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/lib/pq v0.0.0-20150723085316-0dad96c0b94f/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY=
github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4=
Expand Down Expand Up @@ -930,6 +932,8 @@ github.com/testcontainers/testcontainers-go v0.40.0 h1:pSdJYLOVgLE8YdUY2FHQ1Fxu+
github.com/testcontainers/testcontainers-go v0.40.0/go.mod h1:FSXV5KQtX2HAMlm7U3APNyLkkap35zNLxukw9oBi/MY=
github.com/testcontainers/testcontainers-go/modules/compose v0.40.0 h1:Bj8W7GieY56sRbVJx1yLh0JVEtOQ8SQMhX+jRtzenLA=
github.com/testcontainers/testcontainers-go/modules/compose v0.40.0/go.mod h1:fEEGqtsoH1KS+sUi1WG4+vH3fqdCyip1U9Hd8P3SRMA=
github.com/testcontainers/testcontainers-go/modules/postgres v0.40.0 h1:s2bIayFXlbDFexo96y+htn7FzuhpXLYJNnIuglNKqOk=
github.com/testcontainers/testcontainers-go/modules/postgres v0.40.0/go.mod h1:h+u/2KoREGTnTl9UwrQ/g+XhasAT8E6dClclAADeXoQ=
github.com/testcontainers/testcontainers-go/modules/redis v0.40.0 h1:OG4qwcxp2O0re7V7M9lY9w0v6wWgWf7j7rtkpAnGMd0=
github.com/testcontainers/testcontainers-go/modules/redis v0.40.0/go.mod h1:Bc+EDhKMo5zI5V5zdBkHiMVzeAXbtI4n5isS/nzf6zw=
github.com/tetratelabs/wazero v1.9.0 h1:IcZ56OuxrtaEz8UYNRHBrUa9bYeX9oVY93KspZZBf/I=
Expand Down
2 changes: 2 additions & 0 deletions e2e/openapi-cfg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ output-options:
- attachUniversalAuth
- createUniversalAuthClientSecret
- createCloudflareAppConnection
- createPostgresPamResource
- createPostgresPamAccount
Loading
Loading