feat: add token file and env Login
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package auth_test
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"s1d3sw1ped/robinhood-agentic-mcp/auth"
|
||||
)
|
||||
|
||||
func TestWriteTokensMode(t *testing.T) {
|
||||
t.Parallel()
|
||||
path := filepath.Join(t.TempDir(), "tokens.json")
|
||||
if err := auth.WriteTokens(path, "abc", ""); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
st, err := os.Stat(path)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if st.Mode().Perm() != 0o600 {
|
||||
t.Fatalf("perm %o", st.Mode().Perm())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user