mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-05-08 00:33:00 +03:00
Pull request 2265: AG-27492-client-runtime-storage
Squashed commit of the following: commit a164bace2e0333cf95622f34df7b0e79eac69f41 Merge:6567cd330
184f476bd
Author: Stanislav Chzhen <s.chzhen@adguard.com> Date: Wed Aug 21 16:14:55 2024 +0300 Merge branch 'master' into AG-27492-client-runtime-storage commit6567cd330c
Author: Stanislav Chzhen <s.chzhen@adguard.com> Date: Tue Aug 20 16:45:43 2024 +0300 all: imp code commit243123a404
Author: Stanislav Chzhen <s.chzhen@adguard.com> Date: Thu Aug 15 19:15:54 2024 +0300 all: add tests commit6489996878
Author: Stanislav Chzhen <s.chzhen@adguard.com> Date: Mon Aug 5 15:12:05 2024 +0300 all: client runtime storage
This commit is contained in:
parent
184f476bdc
commit
30c0bbe5cc
7 changed files with 420 additions and 88 deletions
internal/home
|
@ -240,7 +240,7 @@ func TestClientsWHOIS(t *testing.T) {
|
|||
t.Run("new_client", func(t *testing.T) {
|
||||
ip := netip.MustParseAddr("1.1.1.255")
|
||||
clients.setWHOISInfo(ip, whois)
|
||||
rc := clients.runtimeIndex.Client(ip)
|
||||
rc := clients.storage.ClientRuntime(ip)
|
||||
require.NotNil(t, rc)
|
||||
|
||||
assert.Equal(t, whois, rc.WHOIS())
|
||||
|
@ -252,7 +252,7 @@ func TestClientsWHOIS(t *testing.T) {
|
|||
assert.True(t, ok)
|
||||
|
||||
clients.setWHOISInfo(ip, whois)
|
||||
rc := clients.runtimeIndex.Client(ip)
|
||||
rc := clients.storage.ClientRuntime(ip)
|
||||
require.NotNil(t, rc)
|
||||
|
||||
assert.Equal(t, whois, rc.WHOIS())
|
||||
|
@ -269,7 +269,7 @@ func TestClientsWHOIS(t *testing.T) {
|
|||
require.NoError(t, err)
|
||||
|
||||
clients.setWHOISInfo(ip, whois)
|
||||
rc := clients.runtimeIndex.Client(ip)
|
||||
rc := clients.storage.ClientRuntime(ip)
|
||||
require.Nil(t, rc)
|
||||
|
||||
assert.True(t, clients.storage.RemoveByName("client1"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue