mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-05-10 09:40:11 +03:00
Pull request 1816: 5704-rm-endian
Updates #5704. Squashed commit of the following: commit 927faf8c3ae0a5deea651ea4249a90ffc80a21c9 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Apr 11 20:02:52 2023 +0300 all: rm our copy of endian
This commit is contained in:
parent
a186b5c436
commit
b23ea0a690
6 changed files with 12 additions and 31 deletions
internal/home
|
@ -6,7 +6,7 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/AdguardTeam/AdGuardHome/internal/aghos"
|
||||
"github.com/josharian/native"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
@ -19,13 +19,13 @@ func TestAuthGL(t *testing.T) {
|
|||
glFilePrefix = dir + "/gl_token_"
|
||||
|
||||
data := make([]byte, 4)
|
||||
aghos.NativeEndian.PutUint32(data, 1)
|
||||
native.Endian.PutUint32(data, 1)
|
||||
|
||||
require.NoError(t, os.WriteFile(glFilePrefix+"test", data, 0o644))
|
||||
assert.False(t, glCheckToken("test"))
|
||||
|
||||
data = make([]byte, 4)
|
||||
aghos.NativeEndian.PutUint32(data, uint32(time.Now().UTC().Unix()+60))
|
||||
native.Endian.PutUint32(data, uint32(time.Now().UTC().Unix()+60))
|
||||
|
||||
require.NoError(t, os.WriteFile(glFilePrefix+"test", data, 0o644))
|
||||
r, _ := http.NewRequest(http.MethodGet, "http://localhost/", nil)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue