summaryrefslogtreecommitdiff
path: root/assets/component-oriented-design/v1/main_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'assets/component-oriented-design/v1/main_test.go')
-rw-r--r--assets/component-oriented-design/v1/main_test.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/assets/component-oriented-design/v1/main_test.go b/assets/component-oriented-design/v1/main_test.go
index 6976690..6cfd9fb 100644
--- a/assets/component-oriented-design/v1/main_test.go
+++ b/assets/component-oriented-design/v1/main_test.go
@@ -114,7 +114,7 @@ func TestScoreboard(t *testing.T) {
}
////////////////////////////////////////////////////////////////////////////////
-// Test httpHandler component
+// Test httpHandlers component
type mockScoreboard map[string]int
@@ -155,3 +155,13 @@ func TestHTTPHandlers(t *testing.T) {
r = httptest.NewRequest("GET", "/scores", nil)
assertRequest(t, 200, "bar: 2\nfoo: 1\n", r)
}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+// httpServer is NOT tested, for the following reasons:
+// * It depends on a `net.Listener`, which is not trivial to mock.
+// * It does very little besides passing an httpHandlers along to an http.Server
+// and managing cleanup.
+// * It isn't likely to be changed often.
+// * If it were to break it would be very apparent in subsequent testing stages.
+//