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

Add missing availability guards in tests #159

Merged

Conversation

simonjbeaumont
Copy link
Collaborator

Motivation

Some of the test code was missing availability guards for Apple platforms, resulting in build failures for these platforms, e.g.

error: 'init(pemDocument:)' is only available in iOS 14 or newer
             let privateKeyAfterRoundtrip = try Certificate.PrivateKey(pemDocument: privateKey.serializeAsPEM())

Modifications

Add missing availability guards. I've tried to keep them as scoped as possible. Some of the tests rely on initializers in CryptoKit that are only available since iOS 14. One suite of tests used this so extensively that I made the whole suite only available on newer platforms.

Result

Tests can now build and run on iOS and other Apple platforms.

@glbrntt
Copy link
Collaborator

glbrntt commented Dec 15, 2023

@swift-server-bot add to allowlist

@glbrntt glbrntt enabled auto-merge (squash) December 15, 2023 16:00
@glbrntt glbrntt added the needs-no-version-bump For PRs that when merged do not need a bump in version number. label Dec 15, 2023
@glbrntt glbrntt merged commit 000be99 into apple:main Dec 15, 2023
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-no-version-bump For PRs that when merged do not need a bump in version number.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants