Commit graph

322 commits

Author SHA1 Message Date
dafc69726f
handle http headers with value lists
All checks were successful
AWS-Zig Build / build-zig-amd64-host (push) Successful in 9m11s
aws-zig nightly build / build-zig-nightly (push) Successful in 8m49s
2025-08-29 15:00:27 -07:00
8f3ca1d9cd
fix remaining signature tests
Some checks failed
aws-zig nightly build / build-zig-nightly (push) Failing after 52s
AWS-Zig Build / build-zig-amd64-host (push) Successful in 7m55s
2025-08-25 17:25:08 -07:00
cfc8aee1a6
a lot of test code, plus a one line ".deinit()" fix
All checks were successful
AWS-Zig Build / build-zig-amd64-host (push) Successful in 7m39s
2025-08-25 14:14:15 -07:00
214c580db4
get failing live request under unit test 2025-08-25 13:07:46 -07:00
e29829f2a0
fix failing s3 test
Some checks failed
AWS-Zig Build / build-zig-amd64-host (push) Failing after 6m25s
Not quite sure the problem I saw earlier in aws.zig, but the data
entering that switch prong is []const u8, so it is fine for what we are
doing
2025-08-25 10:00:50 -07:00
74704506d8
update tests for zig 0.15.1
Some checks failed
AWS-Zig Build / build-zig-amd64-host (push) Failing after 1m41s
This removes the need to spin up a web server for each test, instead,
mocking the necessary methods to do everything in line. This will make
the tests much more resilient, and with the remaining WriterGate changes
expected in zig 0.16, I suspect the mocking will be unnecessary in the
next release.

There are several test issues that remain:

* Two skipped tests in signature verification. This is the most
  concerning of the remaining issues
* Serialization of [][]const u8 was probably broken in zig 0.14.1, but
  the new version has surfaced this issue. Warning messages are being
  sent, and this needs to be tracked down
* One of the tests is failing as S3 storage tier extra header is not
  being offered. I'm not sure what in the upgrade might have changed
  this behavior, but this needs to be investigated
2025-08-24 15:56:36 -07:00
1e8756cc9a
fix runtime panics, set tests to skip for now 2025-08-23 13:34:36 -07:00
b126ec25e8
fix aws.zig tests 2025-08-23 10:56:21 -07:00
b2ce163b6f
fix aws.zig and url.zig tests, simplify url testing and skip 1 test for now 2025-08-23 10:45:35 -07:00
90c5efcace
clean up all the basic things 2025-08-23 09:44:34 -07:00
0a0933e38f
move test suite to its own file 2025-08-23 09:20:22 -07:00
1170ba99fc
fix most test compilation errors 2025-08-23 08:48:32 -07:00
8d399cb8a6
zig build compiles using zig 0.15.1
Some checks failed
AWS-Zig Build / build-zig-amd64-host (push) Failing after 2m27s
2025-08-22 18:00:34 -07:00
Simon Hartcher
3979d32a1d fix(json): need to write null when structure is null
All checks were successful
AWS-Zig Build / build-zig-amd64-host (push) Successful in 7m53s
2025-06-05 13:47:37 +10:00
Simon Hartcher
045150964b fix: handle structures with no members 2025-06-04 15:56:02 +10:00
Simon Hartcher
af0d4d92b3 refactor: rewrite json stringification to write json directly 2025-06-04 14:58:16 +10:00
Simon Hartcher
60f1863557 chore: fix broken tests 2025-06-04 12:26:34 +10:00
Simon Hartcher
ee16fcf6cb chore: zlint auto fix 2025-06-04 10:59:57 +10:00
Simon Hartcher
489581ead2 feat: optional lists and maps to json 2025-06-04 10:50:38 +10:00
Simon Hartcher
9bc13d932a feat: add jsonStringify method to request objects 2025-06-03 10:37:10 +10:00
Simon Hartcher
9b673b0ff3 fix: map to json 2025-06-03 10:07:25 +10:00
Simon Hartcher
a4d4da348f fix: checking if member is required 2025-06-03 10:07:25 +10:00
Simon Hartcher
d2ba0af842 feat: adds toJson function to request objects that converts to a json Value 2025-06-03 10:07:25 +10:00
Simon Hartcher
934323acf1 refactor: generate types for maps
TODO: handle json stringify for generated map types
2025-05-14 15:29:21 +10:00
c6a1bb2418
upgrade smithy to 4187d899 (enables optional service version) 2025-05-07 12:25:21 -07:00
Simon Hartcher
a91b2e8ddb refactor(detectArrayStyle): remove void value from hashmap generation 2025-04-30 09:56:41 +10:00
Simon Hartcher
622a815628 refactor(detectArrayStyle): avoid nested loop by using a hash map 2025-04-30 09:53:58 +10:00
Simon Hartcher
007c5a8a15 refactor(detectArrayStyle): use elements iterator 2025-04-30 09:48:14 +10:00
Simon Hartcher
288f88dfb6 chore: use scoped log 2025-04-29 17:08:17 +10:00
Simon Hartcher
7438642d91 fix: xml parser can now handle repeated root arrays 2025-04-29 16:57:11 +10:00
68a77db6d9
Merge PR 15: Handle empty response bodies and multiple types of timestamps
All checks were successful
AWS-Zig Build / build-zig-amd64-host (push) Successful in 7m18s
2025-04-28 20:15:12 -07:00
Simon Hartcher
dc05b20bda fix: undefined behaviour for responses with no body 2025-04-24 16:50:46 +10:00
Simon Hartcher
0ac10d5798 chore: 404 is not an error in most situations 2025-04-24 11:00:14 +10:00
Simon Hartcher
324ed9a7e3 chore: add URL to reportTraffic output 2025-04-24 10:33:47 +10:00
Simon Hartcher
dc50fd882c fix: restore accidentally commented code 2025-04-24 10:32:48 +10:00
Simon Hartcher
3c7b336298 fix: use arena so that set headers no longer leak memory 2025-04-23 16:41:06 +10:00
Simon Hartcher
0fe727c7eb fix: xml memory leaks using arena 2025-04-23 16:39:04 +10:00
Simon Hartcher
bc328e72ad fix: json memory leaks using arena 2025-04-23 16:37:28 +10:00
Simon Hartcher
5a8cceaa0b chore: wip refactor of FullResponse to use arena allocator to simplify memory management 2025-04-23 16:33:20 +10:00
Simon Hartcher
8007a910dd refactor: create shared lib for json 2025-04-23 12:15:04 +10:00
Simon Hartcher
29e9dd481b refactor: extract date methods into shared date lib 2025-04-23 11:51:53 +10:00
Simon Hartcher
3cae1882f7 refactor(endPointFromUri): parse Uri using standard library
All checks were successful
AWS-Zig Build / build-zig-amd64-host (push) Successful in 7m13s
2025-04-23 10:44:56 +10:00
Simon Hartcher
3fea7d9f0e refactor: handle empty response bodies and multiple types of timestamps 2025-04-22 16:06:50 +10:00
f4c306a2df
support rest_xml with non-string payloads (e.g. S3 create bucket)
All checks were successful
AWS-Zig Build / build-zig-amd64-host (push) Successful in 7m17s
2025-04-18 15:04:43 -07:00
52f99bb35f
split strings from other types that need xml serialization 2025-04-18 11:21:42 -07:00
0a21a9f184
add failing test for S3 create bucket 2025-04-18 11:20:58 -07:00
28698e8ec4
add xml serialization capabilities
All checks were successful
AWS-Zig Build / build-zig-amd64-host (push) Successful in 7m6s
2025-04-18 10:20:22 -07:00
ea14e3b90a
better test web server management
All checks were successful
AWS-Zig Build / build-zig-amd64-host (push) Successful in 7m20s
2025-04-17 17:42:10 -07:00
12c7c46594
add test server timeout 2025-04-16 19:35:47 -07:00
Simon Hartcher
1b4788f469 fix: undefined behaviour in parseJsonData 2025-04-08 12:49:59 +10:00