Skip to content

fix: resolve config paths from test output#4

Merged
bradbrowne merged 1 commit into
xyztfrom
codex/xyzt/mapmanager-net48-config
Jul 23, 2026
Merged

fix: resolve config paths from test output#4
bradbrowne merged 1 commit into
xyztfrom
codex/xyzt/mapmanager-net48-config

Conversation

@bradbrowne

Copy link
Copy Markdown

Summary

  • Resolve Default and Shared config paths from AppContext.BaseDirectory.
  • Keep the adopted MapManager.UnitTests project on net48.
  • Fix the newly discovered config test family under the Xyzt PullRequest gate.

Verification

  • dotnet test MapManager.UnitTests/MapManager.UnitTests.csproj --configuration Release --no-build --no-restore --filter FullyQualifiedName~ConfigTest
  • 12 passed on net48.
  • Native GDAL/MapServer tests remain environment-dependent and are outside this path fix.

Fixes mapdojo/Xyzt#171

Copilot AI review requested due to automatic review settings July 23, 2026 04:26
@bradbrowne
bradbrowne merged commit 0085f8f into xyzt Jul 23, 2026
1 check passed
@bradbrowne
bradbrowne deleted the codex/xyzt/mapmanager-net48-config branch July 23, 2026 04:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates config path resolution to be based on the test/app output directory (AppContext.BaseDirectory) so Default and Shared config lookups work reliably under the test runner (including the ConfigTest family referenced in the PR description).

Changes:

  • Resolve Default config directory from AppContext.BaseDirectory.
  • Resolve Shared config directory by walking up from AppContext.BaseDirectory to locate the repo-level Shared directory.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
MapManager.Apis/Config/Shared.cs Switches Shared directory resolution to be based on the output directory (test/app base directory).
MapManager.Apis/Config/Default.cs Switches Default directory resolution to be based on the output directory (test/app base directory).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +16 to 18
var outputDirectory = new DirectoryInfo(AppContext.BaseDirectory.TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar));
var sharedDirectory = new DirectoryInfo(Path.Combine(outputDirectory.Parent.Parent.FullName, "Shared"));
return sharedDirectory;
{
var assemblyDirectory
= new DirectoryInfo(Path.Combine(Path.GetDirectoryName(typeof(Version).Assembly.Location) ?? @"./", "Default"));
var assemblyDirectory = new DirectoryInfo(Path.Combine(AppContext.BaseDirectory, "Default"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants