-
-
Notifications
You must be signed in to change notification settings - Fork 333
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: SentryFilemanager will create folder depending on dsn (#229)
* fix: SentryFilemanager will create folder depending on dsn Fixes #216 * ci: Update to new xcode9.2 image * meta: Remove unused code
- Loading branch information
Showing
13 changed files
with
49 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
language: objective-c | ||
osx_image: xcode8.3 | ||
osx_image: xcode9.2 | ||
|
||
cache: | ||
- bundler | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ | |
#import "SentryBreadcrumbStore.h" | ||
#import "SentryFileManager.h" | ||
#import "NSDate+Extras.h" | ||
#import "SentryDsn.h" | ||
|
||
@interface SentryBreadcrumbTests : XCTestCase | ||
|
||
|
@@ -23,7 +24,7 @@ @implementation SentryBreadcrumbTests | |
- (void)setUp { | ||
[super setUp]; | ||
NSError *error = nil; | ||
self.fileManager = [[SentryFileManager alloc] initWithError:&error]; | ||
self.fileManager = [[SentryFileManager alloc] initWithDsn:[[SentryDsn alloc] initWithString:@"https://username:[email protected]/12345" didFailWithError:nil] didFailWithError:&error]; | ||
XCTAssertNil(error); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
#import <XCTest/XCTest.h> | ||
#import <Sentry/Sentry.h> | ||
#import "SentryFileManager.h" | ||
#import "SentryDsn.h" | ||
|
||
@interface SentryFileManagerTests : XCTestCase | ||
|
||
|
@@ -22,7 +23,7 @@ - (void)setUp { | |
[super setUp]; | ||
SentryClient.logLevel = kSentryLogLevelDebug; | ||
NSError *error = nil; | ||
self.fileManager = [[SentryFileManager alloc] initWithError:&error]; | ||
self.fileManager = [[SentryFileManager alloc] initWithDsn:[[SentryDsn alloc] initWithString:@"https://username:[email protected]/12345" didFailWithError:nil] didFailWithError:&error]; | ||
XCTAssertNil(error); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -274,7 +274,7 @@ - (void)testBreadcrumb { | |
} | ||
|
||
- (void)testBreadcrumbStore { | ||
SentryBreadcrumbStore *store = [[SentryBreadcrumbStore alloc] initWithFileManager:[[SentryFileManager alloc] initWithError:nil]]; | ||
SentryBreadcrumbStore *store = [[SentryBreadcrumbStore alloc] initWithFileManager:[[SentryFileManager alloc] initWithDsn:[[SentryDsn alloc] initWithString:@"https://username:[email protected]/12345" didFailWithError:nil] didFailWithError:nil]]; | ||
SentryBreadcrumb *crumb = [[SentryBreadcrumb alloc] initWithLevel:kSentrySeverityInfo category:@"http"]; | ||
[store addBreadcrumb:crumb]; | ||
NSDate *date = [NSDate date]; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -156,7 +156,7 @@ @implementation SentryRequestTests | |
|
||
- (void)clearAllFiles { | ||
NSError *error = nil; | ||
SentryFileManager *fileManager = [[SentryFileManager alloc] initWithError:&error]; | ||
SentryFileManager *fileManager = [[SentryFileManager alloc] initWithDsn:[[SentryDsn alloc] initWithString:@"https://username:[email protected]/12345" didFailWithError:nil] didFailWithError:&error]; | ||
[fileManager deleteAllStoredEvents]; | ||
[fileManager deleteAllStoredBreadcrumbs]; | ||
[fileManager deleteAllFolders]; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ class SentrySwiftTests: XCTestCase { | |
|
||
override func setUp() { | ||
super.setUp() | ||
let fileManager = try! SentryFileManager(error: ()) | ||
let fileManager = try! SentryFileManager(dsn: SentryDsn(string: "https://username:[email protected]/12345")) | ||
fileManager.deleteAllStoredEvents() | ||
fileManager.deleteAllStoredBreadcrumbs() | ||
fileManager.deleteAllFolders() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,13 +54,15 @@ - (void)testCrashedLastLaunch { | |
|
||
- (void)testBreadCrumbTracking { | ||
NSError *error = nil; | ||
SentryClient *client = [[SentryClient alloc] initWithDsn:@"https://username:[email protected]/12345" didFailWithError:&error]; | ||
SentryClient *client = [[SentryClient alloc] initWithDsn:@"https://username:[email protected]/123456" didFailWithError:&error]; | ||
[client.breadcrumbs clear]; | ||
[client enableAutomaticBreadcrumbTracking]; | ||
XCTAssertEqual(client.breadcrumbs.count, (unsigned long)0); | ||
[SentryClient setSharedClient:client]; | ||
[SentryClient.sharedClient enableAutomaticBreadcrumbTracking]; | ||
XCTAssertEqual(SentryClient.sharedClient.breadcrumbs.count, (unsigned long)1); | ||
[SentryClient setSharedClient:nil]; | ||
[client.breadcrumbs clear]; | ||
} | ||
|
||
- (void)testInstallation { | ||
|