Skip to content

Commit

Permalink
Found another test to delete the file
Browse files Browse the repository at this point in the history
  • Loading branch information
mbruin-NR committed Dec 7, 2023
1 parent 602a9c5 commit 492a5d7
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#import "NRTestConstants.h"
#import "NRMAFlags.h"
#import "NRMAHTTPUtilities.h"
#import "NewRelicInternalUtils.h"
#import "Constants.h"

static NewRelicAgentInternal* _sharedInstance;

Expand All @@ -34,8 +36,13 @@ @implementation NRMAURLSessionHeaderTrackingTests

- (void)setUp {
[super setUp];
NSFileManager *fileManager = [NSFileManager defaultManager];
NSString* testFileName = [[NewRelicInternalUtils getStorePath] stringByAppendingPathComponent:kNRMA_EventStoreFilename];
if([fileManager fileExistsAtPath:testFileName]) {
[fileManager removeItemAtPath:testFileName error:nil];
}

[NRMAFlags enableFeatures: NRFeatureFlag_NetworkRequestEvents | NRFeatureFlag_NewEventSystem];
[NRMAAnalytics clearDuplicationStores];

[NRMAURLSessionOverride beginInstrumentation];
self.mockNewRelicInternals = [OCMockObject mockForClass:[NewRelicAgentInternal class]];
Expand Down

0 comments on commit 492a5d7

Please sign in to comment.