Skip to content

story(issue-633): implement post machines endpoint#638

Draft
Zaba505 wants to merge 6 commits intomainfrom
story/issue-633/machine-implement-post-apiv1machines-endpoint
Draft

story(issue-633): implement post machines endpoint#638
Zaba505 wants to merge 6 commits intomainfrom
story/issue-633/machine-implement-post-apiv1machines-endpoint

Conversation

@Zaba505
Copy link
Owner

@Zaba505 Zaba505 commented Nov 24, 2025

Closes #633

@Zaba505 Zaba505 self-assigned this Nov 24, 2025
@Zaba505 Zaba505 added the enhancement New feature or request label Nov 24, 2025
@Zaba505 Zaba505 linked an issue Nov 24, 2025 that may be closed by this pull request
11 tasks
Copy link
Owner Author

Choose a reason for hiding this comment

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

this can be removed since it doesn't actually test anything

Copy link
Owner Author

Choose a reason for hiding this comment

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

This should be a reusable pacakge for all services so move it to a top level package path of pkg/api

return invalidFields
}

func ValidateMACAddress(mac string) error {
Copy link
Owner Author

Choose a reason for hiding this comment

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

this shouldn't be public since its only used in this package

Copy link
Owner Author

Choose a reason for hiding this comment

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

This should be a single test function, TestPostMachines, which is table driven and for each test uses PostMachines() to configure a rest.Api that created in the test case. Then the rest.Api is passed to httptest.Server so that all test cases are actually tests against the full endpoint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

story(machine): implement POST /api/v1/machines endpoint

1 participant