Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Unit Tests] - VerifyTribeUUID #2096

Closed

Conversation

MahtabBukhari
Copy link
Contributor

@MahtabBukhari MahtabBukhari commented Dec 4, 2024

No description provided.

@tomsmith8 tomsmith8 requested a review from elraphty December 4, 2024 19:39
}

return pubkey, nil
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MahtabBukhari, this function has already been declared in auth.go, why redeclare it here?

Copy link
Contributor Author

@MahtabBukhari MahtabBukhari Dec 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@elraphty @tomsmith8 Here we have to redeclare "VerifyTribeUUID" because it is using these you method in his body

"ParseTokenString", "VerifyAndExtract" for mocking these two method then we also have to use in "VerifyTribeUUID" to check the tests only for "VerifyTribeUUID"

When we use the original "VerifyTribeUUID" then the unit tests are not going to be pass in any way

Please guide me what would be the best way now?

Copy link
Contributor

@elraphty elraphty Dec 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have to create a real signature, you are trying to bypass testing the original function, check out #2113

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have to create a real signature, you are trying to bypass testing the original function, check out #2113

@elraphty Here is the correct unit test PR #2130

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants