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

Allowing DeviceBinding NONE option on Simulators #308

Merged
merged 3 commits into from
Oct 11, 2024

Conversation

george-bafaloukas-forgerock
Copy link
Contributor

Allowing DeviceBinding NONE option on Simulators

Definition of Done Checklist:

  • Acceptance criteria is met.
  • All tasks listed in the user story have been completed.
  • Coded to standards.
  • Ensure backward compatibility.
  • API reference docs is updated.
  • Unit tests are written.
  • Integration tests are written.
  • e2e tests are written.
  • Functional spec is written/updated.
  • Example code snippets have been added.
  • Change log updated.
  • Documentation story is created and tracked.
  • Tech debts and remaining tasks are tracked in separated ticket(s).

// DeviceBinding/Signing is not supported on the iOS Simulator
handleException(status: .unsupported(errorMessage: "DeviceBinding/Signing is not supported on the iOS Simulator"), completion: completion)
return
// DeviceBinding/Signing other than `.NONE` type is not supported on the iOS Simulator
Copy link
Contributor

Choose a reason for hiding this comment

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

can we add some tests for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tests were failing and fixed based on that

Copy link
Contributor

@jeyanthanperiyasamy jeyanthanperiyasamy Oct 9, 2024

Choose a reason for hiding this comment

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

sorry didnt notice this test class update, when I add my comment, and at the same time u pushed.

// DeviceBinding/Signing is not supported on the iOS Simulator
handleException(status: .unsupported(errorMessage: "DeviceBinding/Signing is not supported on the iOS Simulator"), completion: completion)
return
// DeviceBinding/Signing other than `.NONE` type is not supported on the iOS Simulator
Copy link
Contributor

Choose a reason for hiding this comment

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

add some tests for this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tests were failing and fixed based on that

Copy link
Contributor

@vahancouver vahancouver left a comment

Choose a reason for hiding this comment

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

Looks good to me, but there are still tests failing.

Failing tests:

DeviceBindingCallbackTests.test_21_execute_fail_timeout()
DeviceSigningVerifierCallbackTests.test_20_execute_fail_timeout()
DeviceSigningVerifierCallbackTests.test_20_execute_single_success_with_invalid_custom_claims()
DeviceSigningVerifierCallbackTests.test_23_sign_CustomDeviceAuthenticatorCustomClaimsAlwaysInvalid()

There are two more tests failing for recaptcha but they are not related to your change.
If u wanna fix them here too, u can replace
XCTAssertEqual(textOutputCallback.message, "\"VALIDATION_ERROR:CAPTCHA validation failed\"")
with XCTAssertTrue(textOutputCallback.message.contains("VALIDATION_ERROR:CAPTCHA validation failed"))

and replace
XCTAssertEqual(textOutputCallback.message, "\"CLIENT_ERROR:CUSTOM_CLIENT_ERROR\"")
with XCTAssertTrue(textOutputCallback.message.contains("CLIENT_ERROR:CUSTOM_CLIENT_ERROR"))

@george-bafaloukas-forgerock
Copy link
Contributor Author

Looks good to me, but there are still tests failing.

Failing tests:

DeviceBindingCallbackTests.test_21_execute_fail_timeout()
DeviceSigningVerifierCallbackTests.test_20_execute_fail_timeout()
DeviceSigningVerifierCallbackTests.test_20_execute_single_success_with_invalid_custom_claims()
DeviceSigningVerifierCallbackTests.test_23_sign_CustomDeviceAuthenticatorCustomClaimsAlwaysInvalid()

There are two more tests failing for recaptcha but they are not related to your change. If u wanna fix them here too, u can replace XCTAssertEqual(textOutputCallback.message, "\"VALIDATION_ERROR:CAPTCHA validation failed\"") with XCTAssertTrue(textOutputCallback.message.contains("VALIDATION_ERROR:CAPTCHA validation failed"))

and replace XCTAssertEqual(textOutputCallback.message, "\"CLIENT_ERROR:CUSTOM_CLIENT_ERROR\"") with XCTAssertTrue(textOutputCallback.message.contains("CLIENT_ERROR:CUSTOM_CLIENT_ERROR"))

Damn I thought I fixed those. Will have a look. I'll leave the recaptcha ones to avoid any merge conflicts

@spetrov spetrov merged commit 0feb747 into develop Oct 11, 2024
7 of 9 checks passed
@spetrov spetrov deleted the DeviceBinding-None-Simulators branch October 11, 2024 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants