[PR #1528] [MERGED] Add unit test of API routes #10608

Closed
opened 2026-04-12 23:04:51 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/1528
Author: @pdevine
Created: 12/14/2023
Status: Merged
Merged: 12/15/2023
Merged by: @pdevine

Base: mainHead: api-unittests


📝 Commits (2)

📊 Changes

4 files changed (+122 additions, -30 deletions)

View changed files

📝 cmd/cmd.go (+1 -6)
📝 go.mod (+3 -0)
📝 server/routes.go (+48 -24)
server/routes_test.go (+70 -0)

📄 Description

This change modifies the base server to allow it to be more easily unit tested. It also adds in a simple unit test to "/api/version" to demonstrate how to add unit tests in the future.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/1528 **Author:** [@pdevine](https://github.com/pdevine) **Created:** 12/14/2023 **Status:** ✅ Merged **Merged:** 12/15/2023 **Merged by:** [@pdevine](https://github.com/pdevine) **Base:** `main` ← **Head:** `api-unittests` --- ### 📝 Commits (2) - [`c1a091f`](https://github.com/ollama/ollama/commit/c1a091f1a59db8855689a6fda3efdfc238b16069) add basic routes unit tests - [`3853d86`](https://github.com/ollama/ollama/commit/3853d86041768ca8a196ec9c44a9e4599e631caa) comments ### 📊 Changes **4 files changed** (+122 additions, -30 deletions) <details> <summary>View changed files</summary> 📝 `cmd/cmd.go` (+1 -6) 📝 `go.mod` (+3 -0) 📝 `server/routes.go` (+48 -24) ➕ `server/routes_test.go` (+70 -0) </details> ### 📄 Description This change modifies the base server to allow it to be more easily unit tested. It also adds in a simple unit test to "/api/version" to demonstrate how to add unit tests in the future. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-12 23:04:51 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#10608