From 278e8b396ed2d9106ea9c9faebe7b2569f922c44 Mon Sep 17 00:00:00 2001 From: Andrey Kornich Date: Tue, 22 Mar 2022 15:53:04 -0700 Subject: [PATCH] test: resolve #134 --- CHANGELOG.md | 24 ++++++++++--------- .../RollbarCocoaLumberjackTests.swift | 23 +++++++++--------- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8baf3846..f136cf3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,19 +27,21 @@ The change log has moved to this repo's [GitHub Releases Page](https://github.co ### 2.1.0 -- feat: resolve #133 - Implement RollbarCocoaLumberjack module -- test: resolve #134 - Implement unit tests for RollbarCocoaLumberjack -- fix: resolve #136 - RollbarPLCrashReporter.init() no longer available +- feat: resolve #141 - Apply developer options of the persisted payload when sending the payload +- feat: resolve #133 - Implement RollbarCocoaLumberjack module +- test: resolve #134 - Implement unit tests for RollbarCocoaLumberjack +- fix: resolve #136 - RollbarPLCrashReporter.init() no longer available +- test: resolve #140 - Factor out common SDK unit testing API - chore: resolve #112 - Upgrade to the latest PLCrashReporter 1.0.1 -- docs: resolve #138 - Move current SDK documentation from readme.io to the repo -- docs: resolve #139 - Document new RollbarCocoaLumberjack module +- docs: resolve #138 - Move current SDK documentation from readme.io to the repo +- docs: resolve #139 - Document new RollbarCocoaLumberjack module ### 2.0.3 -- docs: resolve #122 - Update RollbarCommon public API doc comments so they are properly rendered by Xcode Quick Help -- docs: resolve #124 - Update RollbarDeploys public API doc comments so they are properly rendered by Xcode Quick Help -- docs: resolve #126 - Update RollbarSwift, RollbarAUL, RollbarPLCrashReporter, and RollbarKSCrash public API doc comments so they are properly rendered by Xcode Quick Help -- docs: resolve #127 - Update RollbarNotifier public API doc comments so they are properly rendered by Xcode Quick Help +- docs: resolve #122 - Update RollbarCommon public API doc comments so they are properly rendered by Xcode Quick Help +- docs: resolve #124 - Update RollbarDeploys public API doc comments so they are properly rendered by Xcode Quick Help +- docs: resolve #126 - Update RollbarSwift, RollbarAUL, RollbarPLCrashReporter, and RollbarKSCrash public API doc comments so they are properly rendered by Xcode Quick Help +- docs: resolve #127 - Update RollbarNotifier public API doc comments so they are properly rendered by Xcode Quick Help - chore: resolve #114 - Consolidate destination parameters for samples - chore: resolve #113 - Consolidate destination parameters for unit tests @@ -73,7 +75,7 @@ The change log has moved to this repo's [GitHub Releases Page](https://github.co ### 2.0.0-beta.14 - feat: allocated new RollbarAUL module project -- fix: resolve #72 - Rollbar* pods 2.0.0-beta.10 not all published +- fix: resolve #72 - Rollbar pods 2.0.0-beta.10 not all published ### 2.0.0-beta.13 @@ -81,7 +83,7 @@ The change log has moved to this repo's [GitHub Releases Page](https://github.co ### 2.0.0-beta.11 -- fix: resolve #72 - Rollbar* pods 2.0.0-beta.10 not all published +- fix: resolve #72 - Rollbar pods 2.0.0-beta.10 not all published ### 2.0.0-beta.10 diff --git a/RollbarCocoaLumberjack/Tests/RollbarCocoaLumberjackTests/RollbarCocoaLumberjackTests.swift b/RollbarCocoaLumberjack/Tests/RollbarCocoaLumberjackTests/RollbarCocoaLumberjackTests.swift index 7360fa00..4f86bbb7 100644 --- a/RollbarCocoaLumberjack/Tests/RollbarCocoaLumberjackTests/RollbarCocoaLumberjackTests.swift +++ b/RollbarCocoaLumberjack/Tests/RollbarCocoaLumberjackTests/RollbarCocoaLumberjackTests.swift @@ -15,10 +15,11 @@ final class RollbarCocoaLumberjackTests: XCTestCase { let rollbarConfig = RollbarConfig(); rollbarConfig.destination.accessToken = RollbarTestHelper.getRollbarPayloadsAccessToken(); rollbarConfig.destination.environment = RollbarTestHelper.getRollbarEnvironment(); - //rollbarConfig.developerOptions.transmit = false; - - XCTAssertTrue(RollbarLogger.readLogItemsFromStore().count == 0); - XCTAssertEqual(RollbarLogger.readLogItemsFromStore().count, 0); + rollbarConfig.developerOptions.transmit = false; + rollbarConfig.developerOptions.logPayload = true; + + XCTAssertTrue(RollbarLogger.readPayloadsFromSdkLog().count == 0); + XCTAssertEqual(RollbarLogger.readPayloadsFromSdkLog().count, 0); dynamicLogLevel = DDLogLevel.debug; DDLog.add(DDOSLogger .sharedInstance); @@ -33,17 +34,15 @@ final class RollbarCocoaLumberjackTests: XCTestCase { func testBasics() { - XCTAssertEqual(RollbarLogger.readLogItemsFromStore().count, 0); - - DDLogError("Get it to Rollbar!"); + XCTAssertEqual(RollbarLogger.readPayloadsFromSdkLog().count, 0); - //Thread.sleep(forTimeInterval: 5.0); + DDLogError("Get it to Rollbar #1!"); + DDLogError("Get it to Rollbar #2!"); + DDLogError("Get it to Rollbar #3!"); - XCTAssertEqual(RollbarLogger.readLogItemsFromStore().count, 1); - } + Thread.sleep(forTimeInterval: 3.0); - func testBasicsMore() { - + XCTAssertEqual(RollbarLogger.readPayloadsFromSdkLog().count, 3); } // func testExample() throws {