diff --git a/Sources/AppHealthChecks/Extensions/Application+Extensions.swift b/Sources/AppHealthChecks/Extensions/Application+Extensions.swift index 7bc1dc8..0f3ef58 100644 --- a/Sources/AppHealthChecks/Extensions/Application+Extensions.swift +++ b/Sources/AppHealthChecks/Extensions/Application+Extensions.swift @@ -1,4 +1,4 @@ -// FS Dependency Injection +// FS App Health Checks // Copyright (C) 2024 FREEDOM SPACE, LLC // @@ -36,7 +36,7 @@ extension Application { public var serviceId: UUID { get { guard let serviceId = storage[ServiceIdKey.self] else { - fatalError("ServiceId not setup for application") + preconditionError("ServiceId not setup for application") } return serviceId } @@ -53,7 +53,7 @@ extension Application { public var releaseId: String { get { guard let releaseId = storage[ReleaseIdKey.self] else { - fatalError("ReleaseId not setup for application") + preconditionError("ReleaseId not setup for application") } return releaseId } diff --git a/Sources/AppHealthChecks/HealthChecks.ApplicationStatus/AppHealthChecks.swift b/Sources/AppHealthChecks/HealthChecks.ApplicationStatus/AppHealthChecks.swift index 4d7bbd3..474877d 100644 --- a/Sources/AppHealthChecks/HealthChecks.ApplicationStatus/AppHealthChecks.swift +++ b/Sources/AppHealthChecks/HealthChecks.ApplicationStatus/AppHealthChecks.swift @@ -1,4 +1,4 @@ -// FS Dependency Injection +// FS App Health Checks // Copyright (C) 2024 FREEDOM SPACE, LLC // diff --git a/Sources/AppHealthChecks/Response/ComponentName.swift b/Sources/AppHealthChecks/Response/ComponentName.swift index e93f3f4..1cf6b02 100644 --- a/Sources/AppHealthChecks/Response/ComponentName.swift +++ b/Sources/AppHealthChecks/Response/ComponentName.swift @@ -1,4 +1,4 @@ -// FS Dependency Injection +// FS App Health Checks // Copyright (C) 2024 FREEDOM SPACE, LLC // diff --git a/Sources/AppHealthChecks/Response/ComponentType.swift b/Sources/AppHealthChecks/Response/ComponentType.swift index fccf7e2..d2486c8 100644 --- a/Sources/AppHealthChecks/Response/ComponentType.swift +++ b/Sources/AppHealthChecks/Response/ComponentType.swift @@ -1,4 +1,4 @@ -// FS Dependency Injection +// FS App Health Checks // Copyright (C) 2024 FREEDOM SPACE, LLC // diff --git a/Sources/AppHealthChecks/Response/HealthCheck.swift b/Sources/AppHealthChecks/Response/HealthCheck.swift index 184597e..8bdfd62 100644 --- a/Sources/AppHealthChecks/Response/HealthCheck.swift +++ b/Sources/AppHealthChecks/Response/HealthCheck.swift @@ -1,4 +1,4 @@ -// FS Dependency Injection +// FS App Health Checks // Copyright (C) 2024 FREEDOM SPACE, LLC // diff --git a/Sources/AppHealthChecks/Response/HealthCheckItem.swift b/Sources/AppHealthChecks/Response/HealthCheckItem.swift index ff17964..1f6c2ef 100644 --- a/Sources/AppHealthChecks/Response/HealthCheckItem.swift +++ b/Sources/AppHealthChecks/Response/HealthCheckItem.swift @@ -1,4 +1,4 @@ -// FS Dependency Injection +// FS App Health Checks // Copyright (C) 2024 FREEDOM SPACE, LLC // diff --git a/Sources/AppHealthChecks/Response/HealthCheckStatus.swift b/Sources/AppHealthChecks/Response/HealthCheckStatus.swift index abdbe31..fe4c58f 100644 --- a/Sources/AppHealthChecks/Response/HealthCheckStatus.swift +++ b/Sources/AppHealthChecks/Response/HealthCheckStatus.swift @@ -1,4 +1,4 @@ -// FS Dependency Injection +// FS App Health Checks // Copyright (C) 2024 FREEDOM SPACE, LLC // diff --git a/Sources/AppHealthChecks/Response/MeasurementType.swift b/Sources/AppHealthChecks/Response/MeasurementType.swift index c649888..f4336c9 100644 --- a/Sources/AppHealthChecks/Response/MeasurementType.swift +++ b/Sources/AppHealthChecks/Response/MeasurementType.swift @@ -1,4 +1,4 @@ -// FS Dependency Injection +// FS App Health Checks // Copyright (C) 2024 FREEDOM SPACE, LLC // diff --git a/Tests/AppHealthChecksTests/AppHealthChecksTests.swift b/Tests/AppHealthChecksTests/AppHealthChecksTests.swift index d2e59f6..a5bc272 100644 --- a/Tests/AppHealthChecksTests/AppHealthChecksTests.swift +++ b/Tests/AppHealthChecksTests/AppHealthChecksTests.swift @@ -1,4 +1,4 @@ -// FS Dependency Injection +// FS App Health Checks // Copyright (C) 2024 FREEDOM SPACE, LLC // @@ -42,17 +42,17 @@ final class AppHealthChecksTests: XCTestCase { app.shutdown() } - func testGetMajorVersion() throws { + func testGetMajorVersion() { let version = AppHealthChecks().getPublicVersion(from: releaseId) XCTAssertEqual(version, 1) } - func testGetMajorVersionForDefaultVersion() throws { + func testGetMajorVersionForDefaultVersion() { let version = AppHealthChecks().getPublicVersion(from: "1-0-0") XCTAssertEqual(version, 0) } - func testGetHealth() throws { + func testGetHealth() { app.serviceId = serviceId app.releaseId = releaseId let response = AppHealthChecks().getHealth(from: app)