Skip to content

CI Errors on Swift 6.1 and 6.2 #109

@dimitribouniol

Description

@dimitribouniol

We need to fix tests so we are correctly checking optional values on Swift 6.1/6.2:

[633/650] Compiling WebAuthnTests TestRSAKeyPair.swift
/__w/swift-webauthn/swift-webauthn/Tests/WebAuthnTests/WebAuthnManagerRegistrationTests.swift:401:28: error: comparing non-optional value of type 'Credential' to 'nil' always returns true
399 |             attestationObject: attestationObject
400 |         )
401 |         #expect(credential != nil)
    |                            `- error: comparing non-optional value of type 'Credential' to 'nil' always returns true
402 | 
403 |         #expect(credential.id == credentialID.base64EncodedString().asString())
[634/650] Compiling WebAuthnTests WebAuthnManagerAuthenticationTests.swift
/__w/swift-webauthn/swift-webauthn/Tests/WebAuthnTests/WebAuthnManagerRegistrationTests.swift:401:28: error: comparing non-optional value of type 'Credential' to 'nil' always returns true
399 |             attestationObject: attestationObject
400 |         )
401 |         #expect(credential != nil)
    |                            `- error: comparing non-optional value of type 'Credential' to 'nil' always returns true
402 | 
403 |         #expect(credential.id == credentialID.base64EncodedString().asString())
[635/650] Compiling WebAuthnTests WebAuthnManagerIntegrationTests.swift
/__w/swift-webauthn/swift-webauthn/Tests/WebAuthnTests/WebAuthnManagerRegistrationTests.swift:401:28: error: comparing non-optional value of type 'Credential' to 'nil' always returns true
399 |             attestationObject: attestationObject
400 |         )
401 |         #expect(credential != nil)
    |                            `- error: comparing non-optional value of type 'Credential' to 'nil' always returns true
402 | 
403 |         #expect(credential.id == credentialID.base64EncodedString().asString())
[636/650] Compiling WebAuthnTests WebAuthnManagerRegistrationTests.swift
/__w/swift-webauthn/swift-webauthn/Tests/WebAuthnTests/WebAuthnManagerRegistrationTests.swift:401:28: error: comparing non-optional value of type 'Credential' to 'nil' always returns true
399 |             attestationObject: attestationObject
400 |         )
401 |         #expect(credential != nil)
    |                            `- error: comparing non-optional value of type 'Credential' to 'nil' always returns true
402 | 
403 |         #expect(credential.id == credentialID.base64EncodedString().asString())
[637/650] Compiling WebAuthnTests MockUser.swift
[638/650] Compiling WebAuthnTests Hexadecimal.swift
[639/650] Compiling WebAuthnTests TestAttestationObject.swift
[640/650] Compiling WebAuthnTests TestAuthData.swift
[641/650] Compiling WebAuthnTests TestClientDataJSON.swift
error: fatalError

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions