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
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ ItemsAdder are optional.
and animations. Resting pets look around with bounded head movement.
- **Staff tools** — browse, locate, and create pets for any player, give eggs,
and audit every staff intervention.
- **Durable saves** — atomic saves, a deletion journal, and recovery for pets left
outside across restarts.
- **Pet recovery** — keep pets and their learning across restarts, including pets
left outside their Pet House.

## Documentation

Expand All @@ -40,15 +40,18 @@ Technical documentation is maintained in [TF-Minecraft/Docs](https://github.com/
With Java 21 and Maven installed, run:

```sh
mvn clean install -DskipTests=false -Dmaven.test.skip=false
mvn clean verify
```

Unit and MockBukkit workflow tests run with JUnit. Every normal verification writes
a JaCoCo report to `target/site/jacoco/` and requires 100% production line coverage,
without class or package exclusions. Verification also requires the execution data
and XML report to exist. CI uploads both test and coverage reports. The `coverage`
profile remains available for older commands. The dev-only Paper server check is
described in [integration-tests/README.md](integration-tests/README.md).
Tests use JUnit, MockBukkit, and Mockito. Surefire reports go to
`target/surefire-reports/`; JaCoCo HTML, XML, and CSV reports go to
`target/site/jacoco/`. Verification requires 100% production line coverage without
class or package exclusions, plus the execution data and XML report. CI uploads
test and coverage reports.

These tests simulate Bukkit and provider integrations. Real Paper behaviour and
client rendering need separate checks; see the
[testing guide](https://github.com/TF-Minecraft/Docs/blob/main/projects/CompanionPets/docs/testing.md).

## License

Expand Down
40 changes: 5 additions & 35 deletions integration-tests/README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,9 @@
# CompanionPets Paper integration checks

This dev-only helper runs once, 12 seconds after enabling, then disables itself.
It uses its own `plugins/CompanionPetsSmoke/` persistence files and namespace.
It never edits the live CompanionPets records. Temporary entities are removed
when it finishes, including failed runs.
The dev-only helper exercises CompanionPets on Paper with the configured provider
plugins. CI compiles the helper; execution needs a separate dev-server run.

Build the plugin and helper with Java 21:
Build, installation, cleanup, and result instructions are in the
[testing guide](https://github.com/TF-Minecraft/Docs/blob/main/projects/CompanionPets/docs/testing.md).

```sh
mvn -Pcoverage clean install "-DskipTests=false" "-Dmaven.test.skip=false"
mvn -f integration-tests/pom.xml clean package
```

If the plugin Maven version differs from `main-SNAPSHOT`, supply
`-Dcompanionpets.version=<version>` to the second command. Copy the helper JAR
from `integration-tests/target/` to the dev server alongside the matching
CompanionPets JAR and its configured provider plugins, then restart dev.
The server process must be able to create or write `plugins/CompanionPetsSmoke/`;
prepare this isolated directory with the server account's ownership if the
plugins directory is not writable.

Look for `COMPANIONPETS_INTEGRATION PASS checks=...` or
`COMPANIONPETS_INTEGRATION FAIL` in the log. Checks use the active config: every
type's body, egg identity, model attachment and available mapped/custom clips;
native AI pause/resume and frozen needs; adoption and body restoration without
losing learning; persistent postures and default learned Follow;
modeled wolves starting shake with the native shake clock; duplicate removal,
owner/staff Pet House, confirmed
release and heal; deletion keeps the vanilla body hidden and clears the
ModelEngine registration and modeled owner; toy landing,
offline return with original data, and rejection of stale projectiles. The final
validation checks configured provider IDs and required animations.

The helper creates isolated records and writes its own staff audit and deletion
journal. Keep those with the log as test evidence. Remove the helper JAR after
running; each installed helper would run again at the next server restart.
The harness is compiled in CI but requires the actual Paper server and providers
to execute. It does not establish correct rendering in a Minecraft client.
Technical documentation is maintained in [TF-Minecraft/Docs](https://github.com/TF-Minecraft/Docs).
Loading