Move Channels into App (#18623)
* Move Channels into App In this PR, we make Channels as part of App instead of Server. This is part of the transition period of moving fields from Server to Channels. For now, Channels contains Server. So the hierarchy is App -> Channels -> Server. And as a first step, we also move httpService to Channels. ```release-note NONE ``` * Fixing another test ```release-note NONE ``` * new method ```release-note NONE ```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
561bc968c8
Коммит
f0ecdcc5f5
@@ -165,13 +165,13 @@ func TestHubSessionRevokeRace(t *testing.T) {
|
||||
UserStore: &mockUserStore,
|
||||
SessionStore: &mockSessionStore,
|
||||
OAuthStore: &mockOAuthStore,
|
||||
ConfigFn: th.App.srv.Config,
|
||||
ConfigFn: th.App.ch.srv.Config,
|
||||
Metrics: th.App.Metrics(),
|
||||
Cluster: th.App.Cluster(),
|
||||
LicenseFn: th.App.srv.License,
|
||||
LicenseFn: th.App.ch.srv.License,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
th.App.srv.userService = userService
|
||||
th.App.ch.srv.userService = userService
|
||||
|
||||
// This needs to be false for the condition to trigger
|
||||
th.App.UpdateConfig(func(cfg *model.Config) {
|
||||
@@ -189,7 +189,7 @@ func TestHubSessionRevokeRace(t *testing.T) {
|
||||
time.Sleep(time.Second)
|
||||
// We override the LastActivityAt which happens in NewWebConn.
|
||||
// This is needed to call RevokeSessionById which triggers the race.
|
||||
th.App.srv.userService.AddSessionToCache(sess1)
|
||||
th.App.ch.srv.userService.AddSessionToCache(sess1)
|
||||
|
||||
go func() {
|
||||
for i := 0; i <= broadcastQueueSize; i++ {
|
||||
|
||||
Ссылка в новой задаче
Block a user