-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7f17c71
Showing
14 changed files
with
1,139 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Integration Tests | ||
|
||
on: | ||
workflow_dispatch: # Allows manual triggering | ||
pull_request: | ||
branches: [ main ] | ||
push: | ||
branches: [ main ] | ||
|
||
jobs: | ||
integration-tests: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
checks: write # Required for publishing test results | ||
|
||
steps: | ||
- name: Checkout Integration Tests | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: surevine/openfire-integration-tests | ||
path: integration-tests | ||
|
||
- name: Initialize Submodules | ||
working-directory: integration-tests | ||
run: | | ||
git submodule update --init | ||
- name: Setup Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
cache: 'maven' | ||
|
||
- name: Run Integration Tests | ||
working-directory: integration-tests | ||
run: ./mvnw -B verify | ||
|
||
- name: Publish Test Results | ||
uses: EnricoMi/publish-unit-test-result-action@v2 | ||
if: always() # Run even if tests fail | ||
with: | ||
junit_files: "integration-tests/target/surefire-reports/*.xml,integration-tests/target/failsafe-reports/*.xml" | ||
check_name: "Integration Test Results" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Maven | ||
target/ | ||
pom.xml.tag | ||
pom.xml.releaseBackup | ||
pom.xml.versionsBackup | ||
pom.xml.next | ||
release.properties | ||
dependency-reduced-pom.xml | ||
buildNumber.properties | ||
.mvn/timing.properties | ||
|
||
# IDE - IntelliJ IDEA | ||
.idea/ | ||
*.iml | ||
*.iws | ||
*.ipr | ||
out/ | ||
|
||
# IDE - Eclipse | ||
.settings/ | ||
.classpath | ||
.project | ||
.factorypath | ||
bin/ | ||
|
||
# IDE - VSCode | ||
.vscode/ | ||
|
||
# Mac OS | ||
.DS_Store | ||
|
||
# Docker data directory created during tests | ||
openfire-docker-compose/federation/_data/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "openfire-docker-compose"] | ||
path = openfire-docker-compose | ||
url = https://github.com/surevine/openfire-docker-compose.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
wrapperVersion=3.3.2 | ||
distributionType=only-script | ||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Openfire Integration Tests | ||
|
||
Integration tests for Openfire, focusing on federation scenarios. | ||
|
||
## Prerequisites | ||
|
||
- Java 17 | ||
- Docker and Docker Compose | ||
|
||
## Setup | ||
|
||
1. Clone this repository: | ||
```bash | ||
git clone https://github.com/surevine/openfire-integration-tests.git | ||
cd openfire-integration-tests | ||
``` | ||
|
||
2. Initialize and update the submodule: | ||
```bash | ||
git submodule update --init | ||
``` | ||
|
||
## Running Tests | ||
|
||
The project uses Maven Wrapper, so no local Maven installation is required. | ||
|
||
Run all integration tests: | ||
```bash | ||
./mvnw verify | ||
``` | ||
|
||
Run a specific test: | ||
```bash | ||
./mvnw verify -Dit.test=ConnectAndAuthenticateIT | ||
``` | ||
|
||
## Test Environment | ||
|
||
The tests use the Openfire Docker Compose environment from the `openfire-docker-compose` repository (included as a submodule). | ||
|
||
The environment provides: | ||
- Two Openfire instances: | ||
- xmpp1 (ports: 5221, 7071, 9091) | ||
- xmpp2 (ports: 5222, 7072, 9092) | ||
- PostgreSQL databases for each instance | ||
- Pre-configured users: | ||
- xmpp1: user1/password, user2/password | ||
- xmpp2: user3/password, user4/password | ||
- Network configuration for federation | ||
|
||
## Development | ||
|
||
### Keeping Up to Date | ||
|
||
1. Pull latest changes from both repositories: | ||
```bash | ||
git pull | ||
git submodule update --remote | ||
``` | ||
|
||
2. If switching branches or updating submodule reference: | ||
```bash | ||
git submodule update --init | ||
``` |
Oops, something went wrong.