gddo-server: clarify that TestRobots only checks the regex

There is much more complicated behavior in isRobot based on usage by IP
address.  This isn't being tested, but requires access to the database.
This is in need of a fuller test (as is much of the gddo-server
directory).

Change-Id: I4f3467b30e3ecc83bf72712f01a183bd211adc16
Reviewed-on: https://go-review.googlesource.com/66931
Reviewed-by: Tuo Shan <shantuo@google.com>
diff --git a/gddo-server/main_test.go b/gddo-server/main_test.go
index ec6c9ec..7c4bc78 100644
--- a/gddo-server/main_test.go
+++ b/gddo-server/main_test.go
@@ -7,7 +7,6 @@
 package main
 
 import (
-	"net/http"
 	"testing"
 )
 
@@ -23,10 +22,13 @@
 	"Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)",
 }
 
-func TestRobots(t *testing.T) {
+func TestRobotPat(t *testing.T) {
+	// TODO(light): isRobot checks for more than just the User-Agent.
+	// Extract out the database interaction to an interface to test the
+	// full analysis.
+
 	for _, tt := range robotTests {
-		req := http.Request{Header: http.Header{"User-Agent": {tt}}}
-		if !isRobot(&req) {
+		if !robotPat.MatchString(tt) {
 			t.Errorf("%s not a robot", tt)
 		}
 	}