set homedir for windows --test
This commit is contained in:
parent
c8434b0e69
commit
b8c3d54f7a
@ -535,6 +535,7 @@ func TestIsLocalReal(t *testing.T) {
|
|||||||
gin.SetMode(gin.TestMode)
|
gin.SetMode(gin.TestMode)
|
||||||
clientPubLoc := t.TempDir()
|
clientPubLoc := t.TempDir()
|
||||||
t.Setenv("HOME", clientPubLoc)
|
t.Setenv("HOME", clientPubLoc)
|
||||||
|
t.Setenv("USERPROFILE", clientPubLoc)
|
||||||
|
|
||||||
_, err := auth.GetPublicKey()
|
_, err := auth.GetPublicKey()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -572,6 +573,7 @@ func TestIsLocalReal(t *testing.T) {
|
|||||||
t.Run("different server pubkey", func(t *testing.T) {
|
t.Run("different server pubkey", func(t *testing.T) {
|
||||||
serverPubLoc := t.TempDir()
|
serverPubLoc := t.TempDir()
|
||||||
t.Setenv("HOME", serverPubLoc)
|
t.Setenv("HOME", serverPubLoc)
|
||||||
|
t.Setenv("USERPROFILE", serverPubLoc)
|
||||||
_, err := auth.GetPublicKey()
|
_, err := auth.GetPublicKey()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user