Skip to content

Commit

Permalink
Fix APIGateway tests after Localstack change
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-fowler committed May 23, 2022
1 parent 3648a7f commit 23acc9e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Tests/SotoTests/Services/APIGateway/APIGatewayTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class APIGatewayTests: XCTestCase {
return Self.apiGateway.createResource(request, logger: TestEnvironment.logger)
}
// extract resource id
.flatMapThrowing { (response) throws -> String in
.flatMapThrowing { response throws -> String in
let resourceId = try XCTUnwrap(response.id)
return resourceId
}
Expand All @@ -161,7 +161,10 @@ class APIGatewayTests: XCTestCase {
case let error as AWSClientError where error == .invalidSignature:
XCTFail()
case let error as APIGatewayErrorType where error == .notFoundException:
XCTAssertEqual(error.message, "Invalid API identifier specified 931875313149:Test+%/*%25")
// Localstack produces a different error message to AWS
if !TestEnvironment.isUsingLocalstack {
XCTAssertEqual(error.message, "Invalid API identifier specified 931875313149:Test+%/*%25")
}
default:
break
}
Expand Down

0 comments on commit 23acc9e

Please sign in to comment.