new EC2 code (still failing/disabled)

This commit is contained in:
Emil Lerch 2022-02-11 09:17:27 -08:00
parent ca801799fc
commit 240d2ebdd1
Signed by: lobo
GPG Key ID: A7B62D657EF764F8
2 changed files with 16 additions and 8 deletions

View File

@ -193,15 +193,16 @@ pub fn Request(comptime action: anytype) type {
});
defer options.client.allocator.free(query);
const body = if (Self.service_meta.aws_protocol == .query)
// Note: EC2 avoided the Action={s}&Version={s} in the body, but it's
// but it's required, so I'm not sure why that code was put in
// originally?
const body =
try std.fmt.allocPrint(options.client.allocator, "Action={s}&Version={s}{s}{s}", .{
action.action_name,
Self.service_meta.version,
continuation,
buffer.items,
})
else // EC2
try std.fmt.allocPrint(options.client.allocator, "{s}", .{buffer.items});
action.action_name,
Self.service_meta.version,
continuation,
buffer.items,
});
defer options.client.allocator.free(body);
return try Self.callAws(.{
.query = query,

View File

@ -169,8 +169,15 @@ pub fn main() anyerror!void {
std.log.err("no functions to work with", .{});
}
},
// TODO: This test fails with broken LLVM module
.ec2_query_no_input => {
std.log.err("EC2 Test disabled due to compiler bug", .{});
// Describe regions is a simpler request and easier to debug
// const instances = try client.call(services.ec2.describe_regions.Request{}, options);
// defer instances.deinit();
// std.log.info("region count: {d}", .{instances.response.regions.?.len});
// Describe instances is more interesting
// const instances = try client.call(services.ec2.describe_instances.Request{}, options);
// defer instances.deinit();
// std.log.info("reservation count: {d}", .{instances.response.reservations.len});