Skip to content

Commit e65362f

Browse files
Danilo Morãesdhulke
authored andcommitted
test: change enterprise license and debug logging for federation test script
1 parent 70d0935 commit e65362f

File tree

3 files changed

+44
-15
lines changed

3 files changed

+44
-15
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -526,26 +526,27 @@ jobs:
526526
sudo -- sh -c "echo '127.0.0.1 hs1' >> /etc/hosts"
527527
sudo -- sh -c "echo '127.0.0.1 rc1' >> /etc/hosts"
528528
529+
- name: Debug enterprise license variable
530+
run: |
531+
echo "=== Debugging ENTERPRISE_LICENSE_RC1 ==="
532+
echo "GitHub variable (vars.ENTERPRISE_LICENSE_RC1):"
533+
echo "Value: '${{ vars.ENTERPRISE_LICENSE_RC1 }}'"
534+
535+
echo ""
536+
echo "GitHub secret (secrets.ENTERPRISE_LICENSE_RC1):"
537+
echo "Value: '${{ secrets.ENTERPRISE_LICENSE_RC1 }}'"
538+
539+
echo ""
540+
echo "Release versions output (needs.release-versions.outputs.enterprise-license):"
541+
echo "Value: '${{ needs.release-versions.outputs.enterprise-license }}'"
542+
529543
- name: Run federation integration tests with pre-built image
530544
working-directory: ./ee/packages/federation-matrix
531545
env:
532546
ROCKETCHAT_IMAGE: ghcr.io/${{ needs.release-versions.outputs.lowercase-repo }}/rocket.chat:${{ needs.release-versions.outputs.gh-docker-tag }}.official
533-
ENTERPRISE_LICENSE_RC1: ${{ needs.release-versions.outputs.enterprise-license }}
547+
ENTERPRISE_LICENSE_RC1: ${{ secrets.ENTERPRISE_LICENSE_RC1 }}
534548
run: yarn test:integration --image "${ROCKETCHAT_IMAGE}"
535549

536-
- name: Display container logs
537-
run: |
538-
echo "=========================================="
539-
echo "ROCKET.CHAT (rc1) CONTAINER LOGS"
540-
echo "=========================================="
541-
docker logs rc1 || echo "Rocket.Chat container not found or no logs"
542-
543-
echo ""
544-
echo "=========================================="
545-
echo "SYNAPSE (hs1) CONTAINER LOGS"
546-
echo "=========================================="
547-
docker logs hs1 || echo "Synapse container not found or no logs"
548-
549550

550551
tests-done:
551552
name: ✅ Tests Done

ee/packages/federation-matrix/docker-compose.test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ services:
103103
OVERWRITE_SETTING_Show_Setup_Wizard: completed
104104
OVERWRITE_SETTING_Federation_Service_Enabled: true
105105
OVERWRITE_SETTING_Federation_Service_Domain: rc1
106-
OVERWRITE_SETTING_Federation_Service_Matrix_Signing_Key: ${MATRIX_SIGNING_KEY_RC1}
107106
OVERWRITE_SETTING_Cloud_Workspace_Client_Id: temp_id
108107
OVERWRITE_SETTING_Cloud_Workspace_Client_Secret: temp_secret
109108
ADMIN_USERNAME: admin

ee/packages/federation-matrix/tests/scripts/run-integration-tests.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,35 @@ log_error() {
9797

9898
# Cleanup function
9999
cleanup() {
100+
# Show container logs if tests failed
101+
if [ -n "${TEST_EXIT_CODE:-}" ] && [ "$TEST_EXIT_CODE" -ne 0 ]; then
102+
echo ""
103+
echo "=========================================="
104+
echo "CONTAINER LOGS (Test Failed)"
105+
echo "=========================================="
106+
107+
echo ""
108+
echo "ROCKET.CHAT (rc1) LOGS:"
109+
echo "----------------------------------------"
110+
if docker ps -q -f name=rc1 | grep -q .; then
111+
docker logs rc1 2>&1 | sed 's/^/ /'
112+
else
113+
echo " Rocket.Chat container not found or no logs"
114+
fi
115+
116+
echo ""
117+
echo "SYNAPSE (hs1) LOGS:"
118+
echo "----------------------------------------"
119+
if docker ps -q -f name=hs1 | grep -q .; then
120+
docker logs hs1 2>&1 | sed 's/^/ /'
121+
else
122+
echo " Synapse container not found or no logs"
123+
fi
124+
125+
echo ""
126+
echo "=========================================="
127+
fi
128+
100129
if [ "$KEEP_RUNNING" = true ]; then
101130
log_info "Keeping Docker containers running (--keep-running flag set)"
102131
log_info "Services are available at:"

0 commit comments

Comments
 (0)