Collect the username when data scouting data is submitted
This patch adds the username of the person that is submitting scouting
data.
I kind of amended the existing unit test to validate this feature by
injecting a fake username at the right places. It doesn't validate
actual HTTPS traffic, but it's good enough for now.
Signed-off-by: Philipp Schrader <philipp.schrader@gmail.com>
Change-Id: I483cf30fd046965b23916b129a074906b586b096
diff --git a/scouting/webserver/requests/requests_test.go b/scouting/webserver/requests/requests_test.go
index 60bee0e..0183736 100644
--- a/scouting/webserver/requests/requests_test.go
+++ b/scouting/webserver/requests/requests_test.go
@@ -222,12 +222,14 @@
ShotsMissed: 1, UpperGoalShots: 2, LowerGoalShots: 3,
ShotsMissedAuto: 4, UpperGoalAuto: 5, LowerGoalAuto: 6,
PlayedDefense: 7, Climbing: 8,
+ CollectedBy: "john",
},
{
TeamNumber: 972, MatchNumber: 1,
ShotsMissed: 2, UpperGoalShots: 3, LowerGoalShots: 4,
ShotsMissedAuto: 5, UpperGoalAuto: 6, LowerGoalAuto: 7,
PlayedDefense: 8, Climbing: 9,
+ CollectedBy: "andrea",
},
},
}
@@ -250,17 +252,20 @@
// MissedShotsAuto, UpperGoalAuto, LowerGoalAuto,
// MissedShotsTele, UpperGoalTele, LowerGoalTele,
// DefenseRating, Climbing,
+ // CollectedBy,
{
971, 1,
4, 5, 6,
1, 2, 3,
7, 8,
+ "john",
},
{
972, 1,
5, 6, 7,
2, 3, 4,
8, 9,
+ "andrea",
},
},
}