mirror of
https://github.com/Team254/cheesy-arena-lite.git
synced 2026-03-09 13:46:44 -04:00
Remove STEMtv client since the service has been discontinued.
This commit is contained in:
@@ -410,16 +410,6 @@ func (web *Web) commitMatchScore(match *model.Match, matchResult *model.MatchRes
|
||||
}()
|
||||
}
|
||||
|
||||
if web.arena.EventSettings.StemTvPublishingEnabled && match.Type != "practice" {
|
||||
// Publish asynchronously to STEMtv.
|
||||
go func() {
|
||||
err = web.arena.StemTvClient.PublishMatchVideoSplit(match, time.Now())
|
||||
if err != nil {
|
||||
log.Printf("Failed to publish match video split to STEMtv: %s", err.Error())
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
// Back up the database, but don't error out if it fails.
|
||||
err = web.arena.Database.Backup(web.arena.EventSettings.Name, fmt.Sprintf("post_%s_match_%s", match.Type, match.DisplayName))
|
||||
if err != nil {
|
||||
|
||||
@@ -157,11 +157,9 @@ func TestCommitMatch(t *testing.T) {
|
||||
match, _ = web.arena.Database.GetMatchById(1)
|
||||
assert.Equal(t, "T", match.Winner)
|
||||
|
||||
// Verify TBA and STEMtv publishing by checking the log for the expected failure messages.
|
||||
// Verify TBA publishing by checking the log for the expected failure messages.
|
||||
web.arena.TbaClient.BaseUrl = "fakeUrl"
|
||||
web.arena.StemTvClient.BaseUrl = "fakeUrl"
|
||||
web.arena.EventSettings.TbaPublishingEnabled = true
|
||||
web.arena.EventSettings.StemTvPublishingEnabled = true
|
||||
var writer bytes.Buffer
|
||||
log.SetOutput(&writer)
|
||||
err = web.commitMatchScore(match, matchResult, false)
|
||||
@@ -169,7 +167,6 @@ func TestCommitMatch(t *testing.T) {
|
||||
time.Sleep(time.Millisecond * 10) // Allow some time for the asynchronous publishing to happen.
|
||||
assert.Contains(t, writer.String(), "Failed to publish matches")
|
||||
assert.Contains(t, writer.String(), "Failed to publish rankings")
|
||||
assert.Contains(t, writer.String(), "Failed to publish match video split to STEMtv")
|
||||
}
|
||||
|
||||
func TestCommitEliminationTie(t *testing.T) {
|
||||
|
||||
@@ -48,8 +48,6 @@ func (web *Web) settingsPostHandler(w http.ResponseWriter, r *http.Request) {
|
||||
eventSettings.TbaEventCode = r.PostFormValue("tbaEventCode")
|
||||
eventSettings.TbaSecretId = r.PostFormValue("tbaSecretId")
|
||||
eventSettings.TbaSecret = r.PostFormValue("tbaSecret")
|
||||
eventSettings.StemTvPublishingEnabled = r.PostFormValue("stemTvPublishingEnabled") == "on"
|
||||
eventSettings.StemTvEventCode = r.PostFormValue("stemTvEventCode")
|
||||
eventSettings.NetworkSecurityEnabled = r.PostFormValue("networkSecurityEnabled") == "on"
|
||||
eventSettings.ApAddress = r.PostFormValue("apAddress")
|
||||
eventSettings.ApUsername = r.PostFormValue("apUsername")
|
||||
|
||||
Reference in New Issue
Block a user