Commit Graph

24 Commits

Author SHA1 Message Date
e781152ebd add .claude to git ignore 2026-07-04 16:50:42 -07:00
2ec35ed0cc Fix test environment writing config files to project root
BukkitConfig calls mcMMO.p.getDataFolder() in its constructor to
determine where to write config files. When tests mock mcMMO.p but
don't stub getDataFolder(), it returns null, which Java resolves to
the current working directory (the project root), causing files like
experience.yml to be created there.

Fix by stubbing mcMMO.p.getDataFolder() with a fresh temporary
directory in every test setup that mocks mcMMO.p:
- MMOTestEnvironment.mockBaseEnvironment(): creates testDataFolder
  in temp and deletes it in cleanUpStaticMocks()
- SQLDatabaseManagerTest.setUpAll(): same pattern, cleaned in tearDownAll()
- FlatFileDatabaseManagerTest.initBeforeAll(): same pattern, cleaned
  in the new tearDownAll() method

Also remove the .gitignore band-aid entries that were added to paper
over the symptom.
2026-05-30 22:58:37 -07:00
3a69634a33 Fix pre-existing test failures and improve Docker test skip mechanism
- FishingTreasureConfig.fixMooshroomEntityId was a public static method that
  called mcMMO.p.getLogger() directly, causing NPE when tests invoked it without
  a live plugin instance. Add a private static Logger field and use it in the
  static method instead.
- TridentsTest.impaleDamageBonusShouldMatchRankOneBaseDamage had a stale expected
  value (1.0) left over from before commit 71868d9d fixed the Impale formula to
  use rank * multiplier. The correct expectation for rank 1 is
  base + 1 * multiplier = 1.5. Rename the test to match the new semantic.
- Add @Tag(docker) to FlatFileDatabaseManagerTest so the existing
  skip-docker-tests Maven profile (-DskipDockerTests=true) excludes it alongside
  SQLDatabaseManagerTest.
- Add generated config file names (experience.yml, config.yml, etc.) to
  .gitignore to prevent accidental staging when tests run without a properly
  mocked getDataFolder().
2026-05-30 21:42:30 -07:00
4cb65a39cb ignore md 2026-04-19 12:49:11 -07:00
0013468ceb ignore html 2026-04-19 12:47:02 -07:00
79730383ab Fixed wiki url being incorrect in various commands 2023-04-03 16:47:58 -07:00
ac8042f5d8 update gitignore 2019-04-28 06:52:16 -07:00
5e8a840418 Ignore Gradle Files 2019-02-06 17:47:06 -08:00
b67b0a5b94 2.1.8 2019-02-05 16:18:15 -08:00
1d6a142b12 Rewrote the RNG system to be more unified 2019-01-24 20:45:26 -08:00
6ec61ecb76 Fireworks from ability activation will be Opt-In, updates to strings 2018-12-24 19:05:46 -08:00
3349e9cb05 Normalize line endings 2013-03-08 21:42:26 +01:00
3668249267 Iterate through the durability damage with Unbreaking check 2012-12-30 23:46:21 +01:00
34027ee7c4 Ignore all Mac OSX filesystem dust 2012-12-30 13:37:34 +01:00
7f16339bd9 Fixed a small bug where players could salvage items in creative mode 2012-12-02 22:44:26 +01:00
0d2abb95b5 Adding AdvancedConfig 2012-11-21 21:49:54 +01:00
a582b07549 Small error fix - As mentioned by Glitchfinder 2012-11-13 22:14:26 +01:00
e822515403 Configuration options for MCCORE-16 2012-03-06 14:50:18 -08:00
GJ
eb0bf07d2c Updated .gitignore to ignore .jar files 2012-02-14 09:30:54 -05:00
595d48d1b4 Update gitignore 2012-02-03 12:29:12 -08:00
f3ffbe1ad1 Add bin to gitignore 2012-02-03 05:51:42 -05:00
647078778d Update gitignore
Remove unused resources.
2012-01-31 01:06:09 -05:00
2297c3e0f6 Merge branch 'refs/heads/master' of git@github.com:TheYeti/mcMMO.git 2012-01-30 12:38:09 -08:00
b5c11de15c Changes to pom for getting dependancies from repos
Moved resources around to be better organized
Added in fix for commands which got lost ?
gitignore
Increment version to dev-2
2012-01-25 16:52:09 -05:00