Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add non-root user to frontend and backend containers #1228

Merged
merged 4 commits into from
Dec 25, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Update startup-tests.yml
tentative fix for broken startup test
eric-intuitem committed Dec 22, 2024
commit ebd7c9faef4a744e6593fb62807dfb63acba990f
9 changes: 6 additions & 3 deletions .github/workflows/startup-tests.yml
Original file line number Diff line number Diff line change
@@ -122,15 +122,18 @@ jobs:
working-directory: ${{ env.frontend-directory }}
run: pnpm exec playwright install
- name: Build the Docker app
run: docker compose -f docker-compose-build.yml up -d
run: |
rm -rf db
mkdir db
docker compose -f docker-compose-build.yml up -d
- name: Create backend environment variables file
working-directory: ${{ env.backend-directory }}
run: |
touch .env
export $(grep -v '^#' .env | xargs)
- name: Config the Docker app
run: |
sleep 180 # give the migrations time to finish (included in the up on the previous step)
sleep 120 # give the migrations time to finish (included in the up on the previous step)
docker compose -f docker-compose-build.yml exec backend /bin/bash -c "DJANGO_SUPERUSER_EMAIL=admin@tests.com DJANGO_SUPERUSER_PASSWORD=1234 poetry run python manage.py createsuperuser --noinput && exit 0"
- name: Run tests
working-directory: ${{ env.frontend-directory }}
@@ -261,7 +264,7 @@ jobs:
export $(grep -v '^#' .env | xargs)
- name: Config the Docker app
run: |
sleep 180 # give the migrations time to finish (included in the up on the previous step)
sleep 120 # give the migrations time to finish (included in the up on the previous step)
docker compose -f enterprise/docker-compose-build.yml exec backend /bin/bash -c "DJANGO_SUPERUSER_EMAIL=admin@tests.com DJANGO_SUPERUSER_PASSWORD=1234 poetry run python manage.py createsuperuser --noinput --settings=${{ env.enterprise-backend-settings-module }} && exit 0"
- name: Run tests
working-directory: ${{ env.frontend-directory }}

Unchanged files with check annotations Beta

} else {
await expect
.soft(value)
.toContainText(

Check failure on line 132 in frontend/tests/utils/page-detail.ts

GitHub Actions / functional-tests (3.11, chromium)

[chromium] › functional/detailed/common.test.ts:82:4 › Tests on applied controls item › Tests on applied controls item details › user can edit applied controls item

1) [chromium] › functional/detailed/common.test.ts:82:4 › Tests on applied controls item › Tests on applied controls item details › user can edit applied controls item Error: Timed out 20000ms waiting for expect(locator).toContainText(expected) Locator: getByTestId('category-field-value') Expected string: "process" Received string: "Policy" Call log: - expect.soft.toContainText with timeout 20000ms - waiting for getByTestId('category-field-value') 24 × locator resolved to <li class="list-none" data-testid="category-field-value">Policy</li> - unexpected value "Policy" at utils/page-detail.ts:132 130 | await expect 131 | .soft(value) > 132 | .toContainText( | ^ 133 | getObjectNameWithoutScope( 134 | typeof values[key] === 'object' 135 | ? !Array.isArray(values[key]) at PageDetail.verifyItem (/home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/utils/page-detail.ts:132:10) at /home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/functional/detailed/common.test.ts:107:5
getObjectNameWithoutScope(
typeof values[key] === 'object'
? !Array.isArray(values[key])