add json_1_0_query_no_input: dynamodb listTables runtime
Some checks failed
AWS-Zig Build / build-zig-0.11.0-amd64-host (push) Failing after -2562047h47m16.854775808s
Some checks failed
AWS-Zig Build / build-zig-0.11.0-amd64-host (push) Failing after -2562047h47m16.854775808s
This commit is contained in:
parent
10e44aa751
commit
298a15a656
31
src/aws.zig
31
src/aws.zig
|
@ -1611,8 +1611,37 @@ test "json_1_0_query_with_input: dynamodb listTables runtime" {
|
||||||
\\}
|
\\}
|
||||||
, test_harness.request_options.request_body);
|
, test_harness.request_options.request_body);
|
||||||
// Response expectations
|
// Response expectations
|
||||||
// TODO: We can get a lot better with this under test
|
|
||||||
try std.testing.expectEqualStrings("QBI72OUIN8U9M9AG6PCSADJL4JVV4KQNSO5AEMVJF66Q9ASUAAJG", call.response_metadata.request_id);
|
try std.testing.expectEqualStrings("QBI72OUIN8U9M9AG6PCSADJL4JVV4KQNSO5AEMVJF66Q9ASUAAJG", call.response_metadata.request_id);
|
||||||
try std.testing.expectEqual(@as(usize, 1), call.response.table_names.?.len);
|
try std.testing.expectEqual(@as(usize, 1), call.response.table_names.?.len);
|
||||||
try std.testing.expectEqualStrings("Customer", call.response.table_names.?[0]);
|
try std.testing.expectEqualStrings("Customer", call.response.table_names.?[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
test "json_1_0_query_no_input: dynamodb listTables runtime" {
|
||||||
|
const allocator = std.testing.allocator;
|
||||||
|
var test_harness = TestSetup.init(allocator, .{
|
||||||
|
.allocator = allocator,
|
||||||
|
.server_response =
|
||||||
|
\\{"AccountMaxReadCapacityUnits":80000,"AccountMaxWriteCapacityUnits":80000,"TableMaxReadCapacityUnits":40000,"TableMaxWriteCapacityUnits":40000}
|
||||||
|
,
|
||||||
|
.server_response_headers = @constCast(&[_][2][]const u8{
|
||||||
|
.{ "Content-Type", "application/json" },
|
||||||
|
.{ "x-amzn-RequestId", "QBI72OUIN8U9M9AG6PCSADJL4JVV4KQNSO5AEMVJF66Q9ASUAAJG" },
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
defer test_harness.deinit();
|
||||||
|
const options = try test_harness.start();
|
||||||
|
const dynamo_db = (Services(.{.dynamo_db}){}).dynamo_db;
|
||||||
|
const call = try test_harness.client.call(dynamo_db.describe_limits.Request{}, options);
|
||||||
|
defer call.deinit();
|
||||||
|
test_harness.stop();
|
||||||
|
// Request expectations
|
||||||
|
try std.testing.expectEqual(std.http.Method.POST, test_harness.request_options.request_method);
|
||||||
|
try std.testing.expectEqualStrings("/", test_harness.request_options.request_target);
|
||||||
|
try test_harness.request_options.expectHeader("X-Amz-Target", "DynamoDB_20120810.DescribeLimits");
|
||||||
|
try std.testing.expectEqualStrings(
|
||||||
|
\\{}
|
||||||
|
, test_harness.request_options.request_body);
|
||||||
|
// Response expectations
|
||||||
|
try std.testing.expectEqualStrings("QBI72OUIN8U9M9AG6PCSADJL4JVV4KQNSO5AEMVJF66Q9ASUAAJG", call.response_metadata.request_id);
|
||||||
|
try std.testing.expectEqual(@as(i64, 80000), call.response.account_max_read_capacity_units.?);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user