mocks

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2025 License: MIT Imports: 6 Imported by: 0

README

Device Management Service Mock Data

This directory contains mock JSON responses for testing the Apple Business Manager Device Management Service API endpoints.

Files

  • validate_get_device_management_services.json - Mock response for GET /mdmServers endpoint
  • validate_get_mdm_server_device_linkages.json - Mock response for GET /mdmServers/{id}/relationships/devices endpoint
  • validate_get_assigned_server_linkage.json - Mock response for GET /orgDevices/{id}/relationships/assignedServer endpoint
  • validate_get_assigned_server_info.json - Mock response for GET /orgDevices/{id}/assignedServer endpoint
  • validate_assign_devices_response.json - Mock response for POST /orgDeviceActivities (assign devices) endpoint
  • validate_unassign_devices_response.json - Mock response for POST /orgDeviceActivities (unassign devices) endpoint

Usage

These JSON files are used by the test suite to validate API response parsing and ensure the client correctly handles the expected response structure from Apple's Business Manager API.

The mock data is based on the official Apple Business Manager API documentation and real API response examples.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeviceManagementMock

type DeviceManagementMock struct{}

func (*DeviceManagementMock) AddMockMDMServer

func (m *DeviceManagementMock) AddMockMDMServer(serverID string, server map[string]any)

AddMockMDMServer adds an MDM server to the mock state

func (*DeviceManagementMock) CleanupMockState

func (m *DeviceManagementMock) CleanupMockState()

CleanupMockState clears all mock state data

func (*DeviceManagementMock) GetMockMDMServer

func (m *DeviceManagementMock) GetMockMDMServer(serverID string) (map[string]any, bool)

GetMockMDMServer retrieves an MDM server from the mock state

func (*DeviceManagementMock) RegisterErrorMocks

func (m *DeviceManagementMock) RegisterErrorMocks()

RegisterErrorMocks registers mock responders that return error responses

func (*DeviceManagementMock) RegisterMocks

func (m *DeviceManagementMock) RegisterMocks()

RegisterMocks registers all the HTTP mock responders for device management services

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL