Skip to content

test: UserSide and DoctorSide contracts have no Foundry test coverage #82

Description

@adarsh-7-satyam

Problem

The MedETH/foundry/test/ directory does not exist and there are no Foundry tests for the two core contracts UserSide.sol and DoctorSide.sol. This makes it impossible to verify contract behaviour during development or catch regressions introduced by future changes. The foundry.toml remapping is also broken — it maps openzeppelin=lib/openzeppelin-contracts but the contracts import @openzeppelin/contracts/..., so forge build fails to resolve imports correctly.

Impact

Without a test suite, any logic bug in createUser, bookAppointment, approveUser, or any other function goes completely undetected. The broken remapping also means the CI forge build job cannot compile the contracts at all, making the entire MedETH/foundry sub-project untestable.

Location

  • MedETH/foundry/test/ — directory does not exist
  • MedETH/foundry/foundry.toml — incorrect remapping on line 5

Current State

remappings = ["openzeppelin=lib/openzeppelin-contracts"]
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";

These two are irreconcilable — the remapping prefix openzeppelin does not match the import prefix @openzeppelin/contracts so forge cannot resolve the path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions