[PR #1970] [MERGED] fakeserver: honor Stop #1982

Closed
opened 2026-03-03 12:37:05 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fsouza/fake-gcs-server/pull/1970
Author: @motiejus
Created: 5/26/2025
Status: Merged
Merged: 6/2/2025
Merged by: @fsouza

Base: mainHead: server-start-stop


📝 Commits (1)

📊 Changes

3 files changed (+28 additions, -6 deletions)

View changed files

📝 fakestorage/mux_transport.go (+5 -0)
📝 fakestorage/server.go (+2 -4)
📝 fakestorage/server_test.go (+21 -2)

📄 Description

Problem: calling server.Close() does not actually close anything — requests can flow as they normally would.

That's because the client always uses *muxTransport, which wires directly into the handlers avoiding all the TCP/HTTP dance.

In days long gone, Server.transport used to be HTTP, and starting/stopping the fakeserver did what one would expect.

Add a test that asserts correct behavior (we depend on it in some our tests), also removing the Server.transport ambiguity, as there is no other use case in this repo.


🔄 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/fsouza/fake-gcs-server/pull/1970 **Author:** [@motiejus](https://github.com/motiejus) **Created:** 5/26/2025 **Status:** ✅ Merged **Merged:** 6/2/2025 **Merged by:** [@fsouza](https://github.com/fsouza) **Base:** `main` ← **Head:** `server-start-stop` --- ### 📝 Commits (1) - [`e910714`](https://github.com/fsouza/fake-gcs-server/commit/e910714e0653fb0b7b1b08f9c3aae6a55f30b4c3) fakeserver: honor Stop ### 📊 Changes **3 files changed** (+28 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `fakestorage/mux_transport.go` (+5 -0) 📝 `fakestorage/server.go` (+2 -4) 📝 `fakestorage/server_test.go` (+21 -2) </details> ### 📄 Description Problem: calling `server.Close()` does not actually close anything — requests can flow as they normally would. That's because the client always uses `*muxTransport`, which wires directly into the handlers avoiding all the TCP/HTTP dance. In days long gone, `Server.transport` used to be HTTP, and starting/stopping the fakeserver did what one would expect. Add a test that asserts correct behavior (we depend on it in some our tests), also removing the `Server.transport` ambiguity, as there is no other use case in this repo. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 12:37:05 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/fake-gcs-server#1982
No description provided.