Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
tburgin committed Oct 2, 2024
1 parent 2d946b4 commit dd3460d
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 13 deletions.
3 changes: 2 additions & 1 deletion Source/santactl/Commands/SNTCommandFileInfo.m
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,8 @@ - (instancetype)initWithDaemonConnection:(MOLXPCConnection *)daemonConn {
kCDHash : self.cdhash,
};

_printQueue = dispatch_queue_create("com.northpolesec.santactl.print_queue", DISPATCH_QUEUE_SERIAL);
_printQueue =
dispatch_queue_create("com.northpolesec.santactl.print_queue", DISPATCH_QUEUE_SERIAL);
}
return self;
}
Expand Down
14 changes: 8 additions & 6 deletions Source/santad/DataLayer/WatchItemsTest.mm
Original file line number Diff line number Diff line change
Expand Up @@ -653,12 +653,14 @@ - (void)testVerifyConfigWatchItemProcesses {
&err);
XCTAssertTrue(std::holds_alternative<PolicyProcessVec>(proc_list));
XCTAssertEqual(std::get<PolicyProcessVec>(proc_list).size(), 2);
XCTAssertEqual(std::get<PolicyProcessVec>(proc_list)[0],
WatchItemPolicy::Process("mypath1", "com.northpolesec.test1", "validtid_1", cdhashBytes,
[certHash UTF8String], std::make_optional(true)));
XCTAssertEqual(std::get<PolicyProcessVec>(proc_list)[1],
WatchItemPolicy::Process("mypath2", "com.northpolesec.test2", "validtid_2", cdhashBytes,
[certHash UTF8String], std::make_optional(false)));
XCTAssertEqual(
std::get<PolicyProcessVec>(proc_list)[0],
WatchItemPolicy::Process("mypath1", "com.northpolesec.test1", "validtid_1", cdhashBytes,
[certHash UTF8String], std::make_optional(true)));
XCTAssertEqual(
std::get<PolicyProcessVec>(proc_list)[1],
WatchItemPolicy::Process("mypath2", "com.northpolesec.test2", "validtid_2", cdhashBytes,
[certHash UTF8String], std::make_optional(false)));
}

- (void)testIsWatchItemNameValid {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ - (instancetype)initWithESAPI:(std::shared_ptr<EndpointSecurityAPI>)esApi
_blockUSBMount = blockUSBMount;
_remountArgs = remountUSBMode;

_diskQueue = dispatch_queue_create("com.northpolesec.santa.daemon.disk_queue", DISPATCH_QUEUE_SERIAL);
_diskQueue =
dispatch_queue_create("com.northpolesec.santa.daemon.disk_queue", DISPATCH_QUEUE_SERIAL);

_diskArbSession = DASessionCreate(NULL);
DASessionSetDispatchQueue(_diskArbSession, _diskQueue);
Expand Down
7 changes: 4 additions & 3 deletions Source/santametricservice/Writers/SNTMetricHTTPWriterTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,10 @@ - (void)testEnsureHTTPErrorCodesResultInErrors {

- (void)testEnsureErrorsFromTransportAreHandled {
NSURL *url = [NSURL URLWithString:@"http://localhost:9444"];
NSError *mockErr = [[NSError alloc] initWithDomain:@"com.northpolesec.santa.metricservice.writers.http"
code:505
userInfo:@{NSLocalizedDescriptionKey : @"test error"}];
NSError *mockErr =
[[NSError alloc] initWithDomain:@"com.northpolesec.santa.metricservice.writers.http"
code:505
userInfo:@{NSLocalizedDescriptionKey : @"test error"}];
NSError *err;

[self createMockResponseWithURL:url withCode:505 withData:nil withError:mockErr];
Expand Down
4 changes: 2 additions & 2 deletions Source/santasyncservice/SNTPushNotificationsTracker.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ - (instancetype)init {
self = [super init];
if (self) {
_notifications = [NSMutableDictionary dictionary];
_notificationsQueue =
dispatch_queue_create("com.northpolesec.santa.syncservice.notifications", DISPATCH_QUEUE_SERIAL);
_notificationsQueue = dispatch_queue_create("com.northpolesec.santa.syncservice.notifications",
DISPATCH_QUEUE_SERIAL);
}
return self;
}
Expand Down

0 comments on commit dd3460d

Please sign in to comment.