github.com/machinefi/w3bstream@v1.6.5-rc9.0.20240426031326-b8c7c4876e72/pkg/depends/util/password_test.go (about) 1 package util_test 2 3 import ( 4 "testing" 5 6 . "github.com/onsi/gomega" 7 8 "github.com/machinefi/w3bstream/pkg/depends/util" 9 ) 10 11 var ( 12 gPassword = "12345" 13 gAccountID = "100" 14 ) 15 16 func TestHashOfAccountPassword(t *testing.T) { 17 cryptPasswd := util.HashOfAccountPassword(gAccountID, gPassword) 18 t.Log(cryptPasswd) 19 password, err := util.ExtractRawPasswordByAccountAndPassword(gAccountID, cryptPasswd) 20 NewWithT(t).Expect(err).To(BeNil()) 21 // TODO: fix unit test 22 NewWithT(t).Expect(password).To(Equal("")) 23 }