Instance Methodsoto-core 7.4.0SotoTestUtils
httpBin
read one request and return details back in body
func httpBin() throws
read one request and return details back in body
func httpBin() throws
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 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 Request
struct Response
enum Result<Output> where Output : Sendable
result from process
enum ServiceProtocol