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

Added tests for the three functions in origin_api.go #160

Merged
merged 1 commit into from
Oct 3, 2023

Conversation

turetske
Copy link
Collaborator

Tests tokens with various scopes for the `VerifyAdvertiseToken` function
Tests the string created from `GetIssuerURL`
Tests token creation using the `CreateAdvertiseToken` function
Also adjusts the mocked cache in redirect_test.go to be used by both test files

@turetske turetske requested a review from joereuss12 September 28, 2023 17:50
	Tests tokens with various scopes for the `VerifyAdvertiseToken` function
	Tests the string created from `GetIssuerURL`
	Tests token creation using the `CreateAdvertiseToken` function
	Also adjusts the mocked cache in redirect_test.go to be used by both test files
@turetske turetske added the test Improvements to the test suite label Sep 28, 2023
@jhiemstrawisc
Copy link
Member

@turetske Just a heads up, we need to meddle with some of these tokens, and ultimately the functions that verify them (and their tests) soon. See issue #159.

I think all this is okay for now, but we might have to come back to revisit at some point soon.

@turetske
Copy link
Collaborator Author

@turetske Just a heads up, we need to meddle with some of these tokens, and ultimately the functions that verify them (and their tests) soon. See issue #159.

I think all this is okay for now, but we might have to come back to revisit at some point soon.

@jhiemstrawisc Okay. I don't know enough about tokens to understand issue #159, but I will absolutely take your word for it.

@bbockelm
Copy link
Collaborator

bbockelm commented Oct 1, 2023

@turetske - is there a corresponding issue for this PR?

@bbockelm bbockelm added this to the v7.1.0 milestone Oct 1, 2023
@turetske
Copy link
Collaborator Author

turetske commented Oct 2, 2023

@bbockelm Yeah, it's #119. I couldn't get started on my last v1.0 issue without clarification so I decided to tackle one of the unit tests issues I created. And then decided might as well test the whole file rather than one function.

Copy link
Contributor

@joereuss12 joereuss12 left a comment

Choose a reason for hiding this comment

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

LGTM!

@joereuss12 joereuss12 merged commit 6b617d3 into PelicanPlatform:main Oct 3, 2023
6 checks passed
@turetske turetske deleted the origin-api-tests branch November 7, 2023 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Improvements to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants