Skip to content

Commit

Permalink
fix(lint): Fix linting issues
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Poignant <[email protected]>
  • Loading branch information
thomaspoignant committed Dec 23, 2024
1 parent 2dee5db commit 87ebf7f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions Tests/GOFeatureFlagTests/goff_api_tests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class GoffApiTests: XCTestCase {
FeatureEvent(kind: "feature", userKey: "981f2662-1fb4-4732-ac6d-8399d9205aa9", creationDate: Int64(Date().timeIntervalSince1970), key: "flag-1", variation: "enabled", value: JSONValue.bool(true), default: false, version: nil, source: "PROVIDER_CACHE")
]
do {
let (response, _) = try await goffAPI.postDataCollector(events: events)
_ = try await goffAPI.postDataCollector(events: events)
XCTFail("Expected to throw GoFeatureFlagError.apiUnauthorizedError, but no error was thrown.")
} catch let error as GoFeatureFlagError {
switch error {
Expand All @@ -52,7 +52,7 @@ class GoffApiTests: XCTestCase {
FeatureEvent(kind: "feature", userKey: "981f2662-1fb4-4732-ac6d-8399d9205aa9", creationDate: Int64(Date().timeIntervalSince1970), key: "flag-1", variation: "enabled", value: JSONValue.bool(true), default: false, version: nil, source: "PROVIDER_CACHE")
]
do {
let (response, _) = try await goffAPI.postDataCollector(events: events)
_ = try await goffAPI.postDataCollector(events: events)
XCTFail("Expected to throw GoFeatureFlagError.forbiddenError, but no error was thrown.")
} catch let error as GoFeatureFlagError {
switch error {
Expand Down
38 changes: 19 additions & 19 deletions Tests/OFREPTests/provider_tests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class ProviderTests: XCTestCase {
let expectation = XCTestExpectation(description: "waiting 1st event")
let cancellable = api.observe().sink{ event in
if(event != ProviderEvent.error(errorCode: nil, message: "The operation couldn’t be completed. (OFREP.OfrepError error 3.)")){
XCTFail("If OFREP API returns a 429 we should receive an ERROR event, received: \(event)")
XCTFail("If OFREP API returns a 429 we should receive an ERROR event, received: \(String(describing: event)))")
}
expectation.fulfill()
}
Expand Down Expand Up @@ -106,7 +106,7 @@ class ProviderTests: XCTestCase {
let expectation = XCTestExpectation(description: "waiting 1st event")
let cancellable = api.observe().sink{ event in
if(event != ProviderEvent.error(errorCode: nil, message: "The operation couldn’t be completed. (OpenFeature.OpenFeatureError error 5.)")){
XCTFail("If OFREP API returns a 400 for TARGETING_KEY_MISSING we should receive an ERROR event, received: \(event)")
XCTFail("If OFREP API returns a 400 for TARGETING_KEY_MISSING we should receive an ERROR event, received: \(String(describing: event)))")
}
expectation.fulfill()
}
Expand Down Expand Up @@ -134,7 +134,7 @@ class ProviderTests: XCTestCase {

let cancellable = api.observe().sink{ event in
if(event != ProviderEvent.error(errorCode: nil, message: "The operation couldn’t be completed. (OpenFeature.OpenFeatureError error 4.)")){
XCTFail("If OFREP API returns a 400 for INVALID_CONTEXT we should receive an ERROR event, received: \(event)")
XCTFail("If OFREP API returns a 400 for INVALID_CONTEXT we should receive an ERROR event, received: \(String(describing: event))")
}
expectation.fulfill()
}
Expand Down Expand Up @@ -164,7 +164,7 @@ class ProviderTests: XCTestCase {
let expectation = XCTestExpectation(description: "waiting 1st event")
let cancellable = api.observe().sink{ event in
if(event != ProviderEvent.error(errorCode: nil, message: "The operation couldn’t be completed. (OpenFeature.OpenFeatureError error 2.)")){
XCTFail("If OFREP API returns a 400 for PARSE_ERROR we should receive an ERROR event, received: \(event)")
XCTFail("If OFREP API returns a 400 for PARSE_ERROR we should receive an ERROR event, received: \(String(describing: event)))")
}
expectation.fulfill()
}
Expand All @@ -187,7 +187,7 @@ class ProviderTests: XCTestCase {
let expectation = XCTestExpectation(description: "waiting 1st event")
let cancellable = api.observe().sink{ event in
if(event != ProviderEvent.ready){
XCTFail("If OFREP API returns a 200 we should receive a ready event, received: \(event)")
XCTFail("If OFREP API returns a 200 we should receive a ready event, received: \(String(describing: event)))")
}
expectation.fulfill()
}
Expand All @@ -212,7 +212,7 @@ class ProviderTests: XCTestCase {
let expectation = XCTestExpectation(description: "waiting 1st event")
let cancellable = api.observe().sink{ event in
if(event != ProviderEvent.ready){
XCTFail("If OFREP API returns a 200 we should receive a ready event, received: \(event)")
XCTFail("If OFREP API returns a 200 we should receive a ready event, received: \(String(describing: event)))")
}
expectation.fulfill()
}
Expand Down Expand Up @@ -264,7 +264,7 @@ class ProviderTests: XCTestCase {
let expectation = XCTestExpectation(description: "waiting 1st event")
let cancellable = api.observe().sink{ event in
if(event != ProviderEvent.ready){
XCTFail("If OFREP API returns a 200 we should receive a ready event, received: \(event)")
XCTFail("If OFREP API returns a 200 we should receive a ready event, received: \(String(describing: event)))")
}
expectation.fulfill()
}
Expand Down Expand Up @@ -300,7 +300,7 @@ class ProviderTests: XCTestCase {
case .ready:
expect.fulfill()
default:
XCTFail("If OFREP API returns a 200 we should receive a ready event, received: \(event)")
XCTFail("If OFREP API returns a 200 we should receive a ready event, received: \(String(describing: event)))")
expect.fulfill()
}
}
Expand Down Expand Up @@ -462,7 +462,7 @@ class ProviderTests: XCTestCase {
let expectation = XCTestExpectation(description: "waiting 1st event")
let cancellable = api.observe().sink{ event in
if(event != ProviderEvent.ready){
XCTFail("If OFREP API returns a 200 we should receive a ready event, received: \(event)")
XCTFail("If OFREP API returns a 200 we should receive a ready event, received: \(String(describing: event)))")
}
expectation.fulfill()
}
Expand Down Expand Up @@ -495,7 +495,7 @@ class ProviderTests: XCTestCase {
let expectation = XCTestExpectation(description: "waiting 1st event")
let cancellable = api.observe().sink{ event in
if(event != ProviderEvent.ready){
XCTFail("If OFREP API returns a 200 we should receive a ready event, received: \(event)")
XCTFail("If OFREP API returns a 200 we should receive a ready event, received: \(String(describing: event)))")
}
expectation.fulfill()
}
Expand Down Expand Up @@ -528,7 +528,7 @@ class ProviderTests: XCTestCase {
let expectation = XCTestExpectation(description: "waiting 1st event")
let cancellable = api.observe().sink{ event in
if(event != ProviderEvent.ready){
XCTFail("If OFREP API returns a 200 we should receive a ready event, received: \(event)")
XCTFail("If OFREP API returns a 200 we should receive a ready event, received: \(String(describing: event)))")
}
expectation.fulfill()
}
Expand Down Expand Up @@ -559,7 +559,7 @@ class ProviderTests: XCTestCase {
let expectation = XCTestExpectation(description: "waiting 1st event")
let cancellable = api.observe().sink{ event in
if(event != ProviderEvent.ready){
XCTFail("If OFREP API returns a 200 we should receive a ready event, received: \(event)")
XCTFail("If OFREP API returns a 200 we should receive a ready event, received: \(String(describing: event)))")
}
expectation.fulfill()
}
Expand Down Expand Up @@ -590,7 +590,7 @@ class ProviderTests: XCTestCase {
let expectation = XCTestExpectation(description: "waiting 1st event")
let cancellable = api.observe().sink{ event in
if(event != ProviderEvent.ready){
XCTFail("If OFREP API returns a 200 we should receive a ready event, received: \(event)")
XCTFail("If OFREP API returns a 200 we should receive a ready event, received: \(String(describing: event)))")
}
expectation.fulfill()
}
Expand Down Expand Up @@ -621,7 +621,7 @@ class ProviderTests: XCTestCase {
let expectation = XCTestExpectation(description: "waiting 1st event")
let cancellable = api.observe().sink{ event in
if(event != ProviderEvent.ready){
XCTFail("If OFREP API returns a 200 we should receive a ready event, received: \(event)")
XCTFail("If OFREP API returns a 200 we should receive a ready event, received: \(String(describing: event)))")
}
expectation.fulfill()
}
Expand Down Expand Up @@ -652,7 +652,7 @@ class ProviderTests: XCTestCase {
let expectation = XCTestExpectation(description: "waiting 1st event")
let cancellable = api.observe().sink{ event in
if(event != ProviderEvent.ready){
XCTFail("If OFREP API returns a 200 we should receive a ready event, received: \(event)")
XCTFail("If OFREP API returns a 200 we should receive a ready event, received: \(String(describing: event)))")
}
expectation.fulfill()
}
Expand All @@ -677,7 +677,7 @@ class ProviderTests: XCTestCase {
let expectation = XCTestExpectation(description: "waiting 1st event")
let cancellable = api.observe().sink{ event in
if(event != ProviderEvent.ready){
XCTFail("If OFREP API returns a 200 we should receive a ready event, received: \(event)")
XCTFail("If OFREP API returns a 200 we should receive a ready event, received: \(String(describing: event)))")
}
expectation.fulfill()
}
Expand All @@ -702,7 +702,7 @@ class ProviderTests: XCTestCase {
let expectation = XCTestExpectation(description: "waiting 1st event")
let cancellable = api.observe().sink{ event in
if(event != ProviderEvent.ready){
XCTFail("If OFREP API returns a 200 we should receive a ready event, received: \(event)")
XCTFail("If OFREP API returns a 200 we should receive a ready event, received: \(String(describing: event)))")
}
expectation.fulfill()
}
Expand All @@ -727,7 +727,7 @@ class ProviderTests: XCTestCase {
let expectation = XCTestExpectation(description: "waiting 1st event")
let cancellable = api.observe().sink{ event in
if(event != ProviderEvent.ready){
XCTFail("If OFREP API returns a 200 we should receive a ready event, received: \(event)")
XCTFail("If OFREP API returns a 200 we should receive a ready event, received: \(String(describing: event)))")
}
expectation.fulfill()
}
Expand All @@ -752,7 +752,7 @@ class ProviderTests: XCTestCase {
let expectation = XCTestExpectation(description: "waiting 1st event")
let cancellable = api.observe().sink{ event in
if(event != ProviderEvent.ready){
XCTFail("If OFREP API returns a 200 we should receive a ready event, received: \(event)")
XCTFail("If OFREP API returns a 200 we should receive a ready event, received: \(String(describing: event)))")
}
expectation.fulfill()
}
Expand Down

0 comments on commit 87ebf7f

Please sign in to comment.