nc_program_manager/Dockerfile.test
dtrentin 39a9566858 feat(07-license-core): RSA offline license core
Phase 07 complete:
- IMachineFingerprint + ILicenseValidator interfaces
- MachineFingerprint: WMI CPU ProcessorID + BaseBoard SerialNumber
- LicenseValidator: RSACryptoServiceProvider + SHA256, injectable public key
- LicenseFile.TryRead: out-param bool, no exceptions from file I/O
- 6 NUnit tests (valid/wrong-machine/tampered/empty/not-base64/missing-file)
- 118 tests total, 116 pass, 2 Fanuc FOCAS ignored (Windows DLL)
- Fix: missing 'using System' in CncMachineFactoryTests.cs
- Fix: Dockerfile.test updated for NcProgramManager rename

PublicKeyXml = PLACEHOLDER until Phase 09 generates real key pair.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 22:58:14 +02:00

37 lines
1.4 KiB
Text

FROM mono:6.12
WORKDIR /build
# Sync Mozilla root certs into Mono trust store — required for NuGet HTTPS on Buster
RUN cert-sync /etc/ssl/certs/ca-certificates.crt
# Copy solution + projects first for layer caching
COPY NcProgramManager.csproj ./
COPY packages.config ./
COPY NcProgramManager.Tests/NcProgramManager.Tests.csproj ./NcProgramManager.Tests/
COPY NcProgramManager.Tests/packages.config ./NcProgramManager.Tests/
COPY NcProgramManager.sln ./
# Restore all packages (sln now includes test project)
RUN nuget restore NcProgramManager.sln -NonInteractive
# Explicit fallback: restore test packages.config directly to same packages dir
RUN nuget restore NcProgramManager.Tests/packages.config \
-OutputDirectory packages -NonInteractive
# Grab NUnit console runner
RUN nuget install NUnit.ConsoleRunner -Version 3.16.3 -OutputDirectory packages -NonInteractive
# Copy source
COPY . .
# Make libs dir explicit (native Win32 DLLs — needed by csproj Content entries, not executed on Linux)
RUN ls Cnc/Fanuc/libs/ || true
# Build test project (Debug)
RUN msbuild NcProgramManager.Tests/NcProgramManager.Tests.csproj \
/p:Configuration=Debug /p:Platform=AnyCPU \
/v:minimal /nologo
# Run tests — skip Fanuc FOCAS tests (marked [Ignore] — need fwlib32.dll)
CMD mono packages/NUnit.ConsoleRunner.3.16.3/tools/nunit3-console.exe \
NcProgramManager.Tests/bin/Debug/NcProgramManager.Tests.dll \
--labels=All