replace Id with ID

This commit is contained in:
2025-02-13 08:00:49 -06:00
parent f948a06b66
commit 32facb1767
19 changed files with 172 additions and 169 deletions

View File

@@ -49,7 +49,7 @@ func TestNKodeAPI(t *testing.T) {
assert.NoError(t, err)
// *** Set nKode ***
confirmInterface, status, err := tr.SetNKode(customerID, setKeySelection, resp.SessionId)
confirmInterface, status, err := tr.SetNKode(customerID, setKeySelection, resp.SessionID)
assert.NoError(t, err)
assert.Equal(t, 200, status)
@@ -57,7 +57,7 @@ func TestNKodeAPI(t *testing.T) {
assert.NoError(t, err)
// *** Confirm nKode ***
status, err = tr.ConfirmNKode(customerID, confirmKeySelection, resp.SessionId)
status, err = tr.ConfirmNKode(customerID, confirmKeySelection, resp.SessionID)
assert.NoError(t, err)
assert.Equal(t, 200, status)
@@ -101,16 +101,16 @@ func TestNKodeAPI(t *testing.T) {
resetResp, status, err := tr.Reset(customerID, attrPerKey, numKeys, userEmail, nkodeResetJwt)
assert.NoError(t, err)
assert.Equal(t, 200, status)
assert.NotEmpty(t, resetResp.SessionId)
assert.NotEmpty(t, resetResp.SessionID)
userPasscode = resetResp.UserIdxInterface[:passcodeLen]
setKeySelection, err = entities.SelectKeyByAttrIdx(resetResp.UserIdxInterface, userPasscode, kpSet)
assert.NoError(t, err)
confirmInterface, status, err = tr.SetNKode(customerID, setKeySelection, resetResp.SessionId)
confirmInterface, status, err = tr.SetNKode(customerID, setKeySelection, resetResp.SessionID)
assert.NoError(t, err)
assert.Equal(t, 200, status)
confirmKeySelection, err = entities.SelectKeyByAttrIdx(confirmInterface, userPasscode, kpSet)
assert.NoError(t, err)
status, err = tr.ConfirmNKode(customerID, confirmKeySelection, resetResp.SessionId)
status, err = tr.ConfirmNKode(customerID, confirmKeySelection, resetResp.SessionID)
assert.NoError(t, err)
assert.Equal(t, 200, status)
loginInterface, status, err = tr.GetLoginInterface(userEmail, customerID)
@@ -211,9 +211,9 @@ func (r *TestRouter) SetNKode(
sessionID string,
) ([]int, int, error) {
data := models.SetNKodePost{
CustomerId: customerID,
CustomerID: customerID,
KeySelection: selection,
SessionId: sessionID,
SessionID: sessionID,
}
body, err := json.Marshal(data)
@@ -240,9 +240,9 @@ func (r *TestRouter) ConfirmNKode(
sessionID string,
) (int, error) {
data := models.ConfirmNKodePost{
CustomerId: customerID,
CustomerID: customerID,
KeySelection: selection,
SessionId: sessionID,
SessionID: sessionID,
}
body, err := json.Marshal(data)
if err != nil {
@@ -282,7 +282,7 @@ func (r *TestRouter) Login(
selection []int,
) (security.AuthenticationTokens, int, error) {
data := models.LoginPost{
CustomerId: customerID,
CustomerID: customerID,
UserEmail: userEmail,
KeySelection: selection,
}
@@ -305,7 +305,7 @@ func (r *TestRouter) RenewAttributes(
customerID string,
) (int, error) {
data := models.RenewAttributesPost{
CustomerId: customerID,
CustomerID: customerID,
}
body, err := json.Marshal(data)
if err != nil {
@@ -323,7 +323,7 @@ func (r *TestRouter) ForgotNKode(
userEmail string,
) (int, error) {
data := models.ForgotNKodePost{
CustomerId: customerID,
CustomerID: customerID,
UserEmail: userEmail,
}
body, err := json.Marshal(data)