Add e2e test for target sort and modify e2e dc testing workflow to build binary (#3176)
* test: 💍 add e2e test case for sort target name * chore: 🤖 update desktop e2e workflow to use boundary ent repo * fix: 🐛 make sure org is fully loaded before sorting * fix: 🐛 add missing step to move binary to correct folder * refactor: 💡 update to wait for table load in test * test: 💍 validate cache status * fix: 🐛 remove unneeded flag so tests use enos binary * refactor: 💡 use commit from ui-ent repo to build binary * fix: 🐛 update selector due to changes from main merge * fix: 🐛 update selector for dropdown link * fix: 🐛 reopen dropdown after switching org + add workflow input * docs: ✏️ clean up comments in workflow file
This commit is contained in:
1 parent
b63ea6eee0
commit
e310b5abfa
4 files changed
+143
-12
No files matched your search
@@ -11,6 +11,17 @@ on:
|
||||
- 'e2e-tests/desktop/**'
|
||||
- '.github/workflows/test-e2e-desktop.yaml'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
boundary-enterprise-branch:
|
||||
description: 'Branch of boundary-enterprise to test against (default to main)'
|
||||
required: true
|
||||
default: 'main'
|
||||
type: string
|
||||
boundary-ui-enterprise-branch:
|
||||
description: 'Branch of boundary-ui-enterprise to test against (default to main)'
|
||||
required: true
|
||||
default: 'main'
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
test:
|
||||
@@ -19,7 +30,6 @@ jobs:
|
||||
env:
|
||||
ENOS_VAR_boundary_edition: "ent"
|
||||
ENOS_VAR_e2e_debug_no_run: true
|
||||
SETUP_CLI: true
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
@@ -51,15 +61,30 @@ jobs:
|
||||
run: |
|
||||
wget https://releases.hashicorp.com/vault/1.12.2/vault_1.12.2_linux_amd64.zip -O /tmp/vault.zip
|
||||
unzip /tmp/vault.zip -d /usr/local/bin
|
||||
|
||||
|
||||
# TODO: We should consider modifying to also build CE binary. For now
|
||||
# building ENT binary using most recent UI commit is sufficient.
|
||||
- name: Checkout boundary-enterprise
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
repository: hashicorp/boundary-enterprise
|
||||
# ref: ${{ github.event.inputs.boundary-enterprise-branch }}
|
||||
ref: ${{ github.event.inputs.boundary-enterprise-branch || 'main' }}
|
||||
path: support/src/boundary-enterprise
|
||||
token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
|
||||
|
||||
- name: Checkout boundary-ui-enterprise
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
repository: hashicorp/boundary-ui-enterprise
|
||||
ref: ${{ github.event.inputs.boundary-ui-enterprise-branch || 'main' }}
|
||||
path: support/src/boundary-ui-enterprise
|
||||
token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
|
||||
|
||||
- name: Use boundary-ui-enterprise commit SHA for building binary
|
||||
run: |
|
||||
cd support/src/boundary-ui-enterprise
|
||||
git rev-parse HEAD > ../boundary-enterprise/internal/ui/VERSION_ent
|
||||
|
||||
- name: GH fix for localhost resolution
|
||||
run: |
|
||||
cat /etc/hosts && echo "-----------"
|
||||
@@ -71,23 +96,27 @@ jobs:
|
||||
echo "127.0.0.1 localhost worker" | sudo tee -a /etc/hosts
|
||||
echo "127.0.0.1 localhost vault" | sudo tee -a /etc/hosts
|
||||
|
||||
# TODO: Build image ourselves in case we don't want to use latest?
|
||||
- name: Get Boundary docker image
|
||||
- name: Set git config
|
||||
run: |
|
||||
docker pull hashicorp/boundary-enterprise:latest
|
||||
docker save hashicorp/boundary-enterprise:latest | gzip > /tmp/boundary-enterprise.zip
|
||||
git config --global url."https://oauth2:${{ secrets.ELEVATED_GITHUB_TOKEN }}@github.com".insteadOf "https://github.com"
|
||||
|
||||
- name: Set up test infra
|
||||
id: infra
|
||||
run: |
|
||||
ssh-keygen -N '' -t ed25519 -f ~/.ssh/github_enos
|
||||
mkdir -p ./enos/terraform-plugin-cache
|
||||
export ENOS_VAR_ui_build_override="ent" && \
|
||||
export ENOS_VAR_boundary_edition="ent" && \
|
||||
export ENOS_VAR_enos_user=$GITHUB_ACTOR && \
|
||||
export ENOS_VAR_aws_ssh_private_key_path=~/.ssh/github_enos && \
|
||||
export ENOS_VAR_boundary_license="${{ secrets.BOUNDARY_ENT_LICENSE }}" && \
|
||||
export ENOS_VAR_boundary_docker_image_file=/tmp/boundary-enterprise.zip && \
|
||||
enos scenario launch --timeout 60m0s --chdir ./support/src/boundary-enterprise/enos e2e_ui_docker_ent builder:crt
|
||||
enos scenario launch --timeout 60m0s --chdir ./support/src/boundary-enterprise/enos e2e_ui_docker_ent builder:local
|
||||
|
||||
- name: Move boundary binary
|
||||
run: |
|
||||
mv ./support/src/boundary-enterprise/bin/boundary /usr/local/bin/
|
||||
boundary version
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pnpm install --frozen-lockfile
|
||||
@@ -116,7 +145,7 @@ jobs:
|
||||
run: |
|
||||
export ENOS_VAR_enos_user=$GITHUB_ACTOR && \
|
||||
export ENOS_VAR_aws_ssh_private_key_path=~/.ssh/github_enos && \
|
||||
enos scenario destroy --timeout 60m0s --chdir ./support/src/boundary-enterprise/enos e2e_ui_docker_ent builder:crt
|
||||
enos scenario destroy --timeout 60m0s --chdir ./support/src/boundary-enterprise/enos e2e_ui_docker_ent builder:local
|
||||
|
||||
- name: Send Slack message on failure
|
||||
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1
|
||||
|
||||
Reference in new issue
Block a user