Structuresoto-core 7.4.0SotoTestUtils
Request
TestServer.swift:43struct Request
struct Request
import SotoTestUtils
final class AWSTestServer
Test server for AWSClient. Input and Output shapes are defined by process function
init(serviceProtocol: ServiceProtocol)
var address: String { get }
var addressURL: URL { get }
var host: String { get }
var serverPort: Int { get }
let serviceProtocol: ServiceProtocol
func ec2MetadataServer(version: IMDSVersion, metaData: EC2InstanceMetaData? = nil) throws
fake ec2 metadata server
func ecsMetadataServer(path: String, metaData: ECSMetaData? = nil) throws
fake ecs metadata server
func httpBin() throws
read one request and return details back in body
func process<Input>(_ process: (Input) throws -> Result<some Encodable>) throws where Input : Decodable
run server reading request, convert from to an input shape processing them and converting the result back to a response.
func processRaw(_ process: (Request) throws -> Result<Response>) throws
run server reading requests, processing them and returning responses
func stop() throws
struct EC2InstanceMetaData
struct ECSMetaData
enum Error
struct ErrorType
Error type
struct HTTPBinResponse
enum IMDSVersion
struct Response
enum Result<Output> where Output : Sendable
result from process
enum ServiceProtocol
protocol Sendable
init(method: HTTPMethod, uri: String, headers: [String : String], body: ByteBuffer)
let body: ByteBuffer
let headers: [String : String]
let method: HTTPMethod
let uri: String