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

Support any suffix and add standard yaml to MediaType #53

Merged
merged 5 commits into from
Nov 2, 2024

Help to stabilize EventSource tests

c4855b7
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Merged

Support any suffix and add standard yaml to MediaType #53

Help to stabilize EventSource tests
c4855b7
Select commit
Loading
Failed to load commit list.
GitHub Actions / Test Results macos succeeded Nov 2, 2024 in 0s

Xcode test results

Testing workspace sunday-swift with scheme Sunday-Package

Summary

TotalSuccess PassedFailure FailedSkipped SkippedExpected Failure Expected Failure⏱️ Time
1451450004.16s

Test Summary

SundayTests

  • Device: Apple Virtual Machine 1, 15.0.1 (24A348)
  • SDK: macOS 15.1, 15.1
TestTotalSuccessFailureSkippedExpected Failure
test-class DataTaskStreamPublisherTests33000
test-class ErrorTests11000
test-class EventParserTests1111000
test-class EventSourceTests1414000
test-class GeneratedAPITests33000
test-class HTTPServerTests77000
test-class HeaderParametersTests99000
test-class MediaTypeCodecTests1010000
test-class MediaTypeTests1111000
test-class NetworkRequestAdapterTests33000
test-class NetworkRequestFactoryTests2626000
test-class PatchTests11000
test-class ProblemTests99000
test-class ResponseDecodingTests44000
test-class URITemplatesTests1212000
test-class URITests77000
test-class URLRequestTests11000
test-class WWWFormURLEncoderTests1313000

Failure Failures

All tests passed 🎉


Code Coverage

Coverage Covered Executable
Sunday 78.66 % 2410 3064
  ServerTrustPolicyManager.swift 0.00 % 0 163
  EventSource.swift 92.27 % 525 569
  DispatchTimeIntervals.swift 100.00 % 18 18
  URLSessionConfigurations.swift 81.25 % 26 32
  NetworkSessionDelegate.swift 25.76 % 51 198
  ResultResponse.swift 100.00 % 4 4
  PathEncoders.swift 94.12 % 16 17
  Description.swift 94.44 % 17 18
  AnyTextMediaTypeDecodable.swift 0.00 % 0 4
  NetworkRequestFactory.swift 86.75 % 478 551
  MediaType.swift 92.99 % 146 157
  Patching.swift 41.18 % 35 85
  CustomHeaderConvertible.swift 0.00 % 0 1
  MediaTypeDecoders.swift 98.97 % 96 97
  HTTP.swift 0.00 % 0 3
  WWWFormURLEncoder.swift 96.26 % 103 107
  Problem.swift 97.28 % 143 147
  EventParser.swift 98.78 % 162 164
  URLRequests.swift 80.00 % 28 35
  NetworkRequestAdapters.swift 98.08 % 51 52
  CharSets.swift 0.00 % 0 12
  MediaTypeEncoders.swift 95.10 % 97 102
  ServiceLocator.swift 0.00 % 0 63
  HeaderParameters.swift 100.00 % 71 71
  Errors.swift 70.59 % 48 68
  Logging.swift 100.00 % 3 3
  URITemplate.swift 95.45 % 84 88
  ResponseHelpers.swift 95.00 % 19 20
  NetworkSession.swift 91.12 % 154 169
  URI.swift 76.09 % 35 46
SundayServer 64.86 % 1067 1645
  RoutablePath.swift 64.29 % 36 56
  HTTPHeaderParser.swift 75.86 % 220 290
  Logging.swift 100.00 % 3 3
  RoutableContentNegotiation.swift 100.00 % 8 8
  HTTPConnection.swift 83.00 % 205 247
  HTTPExchange.swift 50.00 % 18 36
  RoutableQueues.swift 0.00 % 0 23
  RoutableResponseEncoding.swift 73.50 % 86 117
  HTTPRequest.swift 42.86 % 9 21
  RoutableParam.swift 20.66 % 25 121
  HTTPResponse.swift 38.61 % 39 101
  RoutingHTTPServer.swift 95.65 % 44 46
  Routable.swift 75.00 % 12 16
  RoutableRequestDecoding.swift 87.27 % 96 110
  RoutableDebug.swift 95.24 % 20 21
  HTTPServer.swift 89.13 % 164 184
  RoutableMethod.swift 33.47 % 82 245
SundayTests 87.58 % 10228 11679
  EventSourceTests.swift 98.10 % 1603 1634
  HTTPServer.swift 89.13 % 164 184
  URITemplatesTests.swift 98.01 % 246 251
  DispatchTimeIntervals.swift 100.00 % 18 18
  RoutableResponseEncoding.swift 73.50 % 86 117
  RoutableParam.swift 20.66 % 25 121
  NetworkRequestAdapterTests.swift 100.00 % 93 93
  Description.swift 94.44 % 17 18
  NetworkSession.swift 91.12 % 154 169
  EventParser.swift 98.78 % 162 164
  URLRequestTests.swift 100.00 % 22 22
  MediaTypeEncoders.swift 95.10 % 97 102
  NetworkSessionDelegate.swift 25.76 % 51 198
  RoutingHTTPServer.swift 95.65 % 44 46
  HTTPExchange.swift 50.00 % 18 36
  URITests.swift 99.32 % 146 147
  URLRequests.swift 80.00 % 28 35
  URLSessionConfigurations.swift 81.25 % 26 32
  ErrorTests.swift 100.00 % 37 37
  GeneratedAPITests.swift 97.38 % 223 229
  RoutableRequestDecoding.swift 87.27 % 96 110
  MediaTypeDecoders.swift 98.97 % 96 97
  HeaderParametersTests.swift 94.56 % 226 239
  RoutableContentNegotiation.swift 100.00 % 8 8
  URI.swift 76.09 % 35 46
  ServiceLocator.swift 0.00 % 0 63
  MediaTypeCodecTests.swift 98.02 % 247 252
  EventSource.swift 92.27 % 525 569
  MediaType.swift 92.99 % 146 157
  AnyTextMediaTypeDecodable.swift 0.00 % 0 4
  DateExts.swift 40.00 % 4 10
  HTTPRequest.swift 42.86 % 9 21
  WWWFormURLEncoderTests.swift 100.00 % 249 249
  RoutableDebug.swift 95.24 % 20 21
  ProblemTests.swift 98.78 % 325 329
  Errors.swift 70.59 % 48 68
  DataTaskStreamPublisherTests.swift 96.70 % 293 303
  HTTPConnection.swift 83.00 % 205 247
  Logging.swift 100.00 % 3 3
  ResultResponse.swift 100.00 % 4 4
  HeaderParameters.swift 100.00 % 71 71
  XCTestCases.swift 100.00 % 3 3
  CustomHeaderConvertible.swift 0.00 % 0 1
  Logging.swift 100.00 % 3 3
  MediaTypeTests.swift 94.50 % 481 509
  RoutableMethod.swift 33.47 % 82 245
  URITemplate.swift 95.45 % 84 88
  Routable.swift 75.00 % 12 16
  EventParserTests.swift 97.35 % 367 377
  HTTPResponse.swift 38.61 % 39 101
  HTTP.swift 0.00 % 0 3
  RoutableQueues.swift 0.00 % 0 23
  ResponseDecodingTests.swift 97.40 % 75 77
  NetworkRequestFactoryTests.swift 95.11 % 1614 1697
  RoutablePath.swift 64.29 % 36 56
  PatchTests.swift 100.00 % 85 85
  XCTestUtils.swift 63.64 % 7 11
  ServerTests.swift 97.36 % 405 416
  HTTPHeaderParser.swift 75.86 % 220 290
  Problem.swift 97.28 % 143 147
  Patching.swift 41.18 % 35 85
  NetworkRequestFactory.swift 86.75 % 478 551
  ResponseHelpers.swift 95.00 % 19 20
  WWWFormURLEncoder.swift 96.26 % 103 107
  ServerTrustPolicyManager.swift 0.00 % 0 163
  NetworkRequestAdapters.swift 98.08 % 51 52
  CharSets.swift 0.00 % 0 12
  PathEncoders.swift 94.12 % 16 17
Total 83.63 % 13705 16388

Details

Test Details

SundayTestsback

DataTaskStreamPublisherTests back

SuccessFailureSkippedExpected Failure⏱️
3 (100%)0 (0%)0 (0%)0 (0%)3.09s
Successtest-method testChunked()
Successtest-method testCompletesWithErrorWhenHTTPErrorResponse()
Successtest-method testSimple()

ErrorTests back

SuccessFailureSkippedExpected Failure⏱️
1 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testDescriptions()

EventParserTests back

SuccessFailureSkippedExpected Failure⏱️
11 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testAllowsEmptyValuesForFields()
Successtest-method testAllowsEmptyValuesForFieldsWithoutColons()
Successtest-method testAllowsEmptyValuesForFieldsWithoutSpaces()
Successtest-method testConcatenatesDataFields()
Successtest-method testDispatchesChunkedEvents()
Successtest-method testDispatchesOnlyCommentLines()
Successtest-method testDispatchOfEventsWithCarriageReturnLineFeeds()
Successtest-method testDispatchOfEventsWithCarriageReturns()
Successtest-method testDispatchOfEventsWithLineFeeds()
Successtest-method testDispatchOfEventsWithMixedCarriageReturnLineFeeds()
Successtest-method testIgnoresCommentLines()

EventSourceTests back

SuccessFailureSkippedExpected Failure⏱️
14 (100%)0 (0%)0 (0%)0 (0%)1.03s
Successtest-method testCallbacks()
Successtest-method testCheckRetryDelays()
Successtest-method testCloseWhenRequestFactoryReturnsNil()
Successtest-method testEventListenerRemove()
Successtest-method testEventTimeoutCheckWithExpiration()
Successtest-method testEventTimeoutCheckWithoutExpiration()
Successtest-method testIgnoresDoubleConnect()
Successtest-method testInvalidRetryTimeoutUpdateIgnored()
Successtest-method testJSONData()
Successtest-method testPingsResetLastEventReceivedTime()
Successtest-method testReconnectsWithLastEventId()
Successtest-method testReconnectsWithLastEventIdIgnoringInvalidIDs()
Successtest-method testSimpleData()
Successtest-method testValidRetryTimeoutUpdate()

GeneratedAPITests back

SuccessFailureSkippedExpected Failure⏱️
3 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testResultCall()
Successtest-method testResultResponseCall()
Successtest-method testVoidResultResponseCall()

HTTPServerTests back

SuccessFailureSkippedExpected Failure⏱️
7 (100%)0 (0%)0 (0%)0 (0%)0.01s
Successtest-method testChunked()
Successtest-method testDELETE()
Successtest-method testGETItem()
Successtest-method testGETList()
Successtest-method testPOST()
Successtest-method testPUTExpect()
Successtest-method testStartWithLocator()

HeaderParametersTests back

SuccessFailureSkippedExpected Failure⏱️
9 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testCustomHeaderConvertibleValues()
Successtest-method testEncodingArrayValues()
Successtest-method testEncodingFloatingValues()
Successtest-method testEncodingIntegerValues()
Successtest-method testEncodingStringValues()
Successtest-method testFailsOnInvalidEncodedHeaderValues()
Successtest-method testFailsOnUnknownParameterTypes()
Successtest-method testIgnoresNilValues()
Successtest-method testLosslessStringConvertibleValues()

MediaTypeCodecTests back

SuccessFailureSkippedExpected Failure⏱️
10 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testDataDecoderDecodesData()
Successtest-method testDataDecoderFailsForAnythingElse()
Successtest-method testDataEncoderEncodesData()
Successtest-method testDataEncoderFailsForAnythingElse()
Successtest-method testTextDecoderDecodesTextData()
Successtest-method testTextDecoderDecodesTextString()
Successtest-method testTextDecoderFailsDecodingDataForAnythingElse()
Successtest-method testTextDecoderFailsDecodingTextForAnythingElse()
Successtest-method testTextEncoderEncodesText()
Successtest-method testTextEncoderFailsEncodingForAnythingElse()

MediaTypeTests back

SuccessFailureSkippedExpected Failure⏱️
11 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testCodable()
Successtest-method testCompatibility()
Successtest-method testEquqlity()
Successtest-method testParameterSupport()
Successtest-method testParmeterAccess()
Successtest-method testParmeterOverwrite()
Successtest-method testParse()
Successtest-method testPatternMatching()
Successtest-method testSanity()
Successtest-method testSuffix()
Successtest-method testValue()

NetworkRequestAdapterTests back

SuccessFailureSkippedExpected Failure⏱️
3 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testHostMatchingAdapter()
Successtest-method testRefreshingTokenAuth()
Successtest-method testTokenAuth()

NetworkRequestFactoryTests back

SuccessFailureSkippedExpected Failure⏱️
26 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testAddsAcceptHeader()
Successtest-method testAddsCustomHeaders()
Successtest-method testAttachesBodyEncodedByContentType()
Successtest-method testEncodesQueryParameters()
Successtest-method testEnsureDefaultsCanBeOverridden()
Successtest-method testEventSourceBuilding()
Successtest-method testEventStreamBuilding()
Successtest-method testExecutesManualRequestsForResponses()
Successtest-method testExecutesRequestsWithNoDataResponse()
Successtest-method testFailsIfNoneOfTheAcceptTypesHasADecoder()
Successtest-method testFailsIfNoneOfTheContentTypesHasAnEncoder()
Successtest-method testFailsWhenNoDataAndNonEmptyResult()
Successtest-method testFailsWhenNoQueryParamEncoderIsRegisteredAndQueryParamsAreProvided()
Successtest-method testFailsWhenResponseContentTypeIsInvalid()
Successtest-method testFailsWhenResponseContentTypeIsUnsupported()
Successtest-method testFailsWhenResponseDeserializationFails()
Successtest-method testFailsWhenResultExpectedAndNoDataInResponse()
Successtest-method testFetchesTypedResults()
Successtest-method testNilifyResponseWorksWithProblemTypess()
Successtest-method testNilifyResponseWorksWithStatusCodes()
Successtest-method testNonProblemErrorResponsesAreTranslatedIntoStandardProblems()
Successtest-method testRegisteredProblemsDecodeAsTypedProblems()
Successtest-method testResponseProblemsFailWhenNoJSONDecoder()
Successtest-method testResponseProblemsWithNoDataAreTranslatedIntoStandardProblems()
Successtest-method testSetContentTypeWhenBodyIsNonExistent()
Successtest-method testUnregisteredProblemsDecodeAsGenericProblems()

PatchTests back

SuccessFailureSkippedExpected Failure⏱️
1 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testSimple()

ProblemTests back

SuccessFailureSkippedExpected Failure⏱️
9 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testCodableForCustomProblems()
Successtest-method testCustomDecodingForGenericProblems()
Successtest-method testDecodingFailsWhenProblemMissingStatus()
Successtest-method testDecodingFailsWhenProblemMissingTitle()
Successtest-method testDecodingFailsWhenProblemMissingType()
Successtest-method testDescription()
Successtest-method testGenericDecodingForCustomProblems()
Successtest-method testInitFromStatus()
Successtest-method testInitFromTree()

ResponseDecodingTests back

SuccessFailureSkippedExpected Failure⏱️
4 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testAdaptiveResponseDecodingCBORtoCBOR()
Successtest-method testAdaptiveResponseDecodingCBORtoJSON()
Successtest-method testAdaptiveResponseDecodingJSONtoCBOR()
Successtest-method testAdaptiveResponseDecodingJSONtoJSON()

URITemplatesTests back

SuccessFailureSkippedExpected Failure⏱️
12 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testCompleteParametersOverrideTemplate()
Successtest-method testCustomPathEncodableAreSerializedCorrectly()
Successtest-method testCustomPathEncodersOverrideDefaultSerialization()
Successtest-method testFailsWithMissingParameter()
Successtest-method testFailsWithUnsupportedValue()
Successtest-method testInit()
Successtest-method testInitDropsTrailingSlash()
Successtest-method testLiteralInit()
Successtest-method testLosslessStringConvertibleAreSerializedCorrectly()
Successtest-method testMutiplePathVariable()
Successtest-method testSlashHandling()
Successtest-method testVariableValuesConvertibleAreSerializedCorrectly()

URITests back

SuccessFailureSkippedExpected Failure⏱️
7 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testCodable()
Successtest-method testComponentsInit()
Successtest-method testInit()
Successtest-method testInitOpaque()
Successtest-method testParseInit()
Successtest-method testParseInitFailsWithBadURL()
Successtest-method testParseInitOpaque()

URLRequestTests back

SuccessFailureSkippedExpected Failure⏱️
1 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testFluent()

WWWFormURLEncoderTests back

SuccessFailure