diff options
| author | Shulhan <ms@kilabit.info> | 2024-02-13 02:14:35 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2024-02-15 01:12:34 +0700 |
| commit | 372d10a3e1ea01f8d03e44e6ab8be673d05c0773 (patch) | |
| tree | 02df85cae2d4398cfd74ae193b05f490628cc517 /testdata | |
| parent | bc00c07248b1097f6e8f9281edc659cbd4bdd4ff (diff) | |
| download | gorankusu-372d10a3e1ea01f8d03e44e6ab8be673d05c0773.tar.xz | |
all: move example to root directory
The goal is to remove duplicate code in testing and show the example on
how to create Gorankusu service from godoc.
Implements: https://todo.sr.ht/~shulhan/gorankusu/5
Diffstat (limited to 'testdata')
| -rw-r--r-- | testdata/target_http_run_formkindfile_test.txt | 14 | ||||
| -rw-r--r-- | testdata/target_http_run_withrawbody_json_test.txt | 10 |
2 files changed, 12 insertions, 12 deletions
diff --git a/testdata/target_http_run_formkindfile_test.txt b/testdata/target_http_run_formkindfile_test.txt index 4f18347..8925406 100644 --- a/testdata/target_http_run_formkindfile_test.txt +++ b/testdata/target_http_run_formkindfile_test.txt @@ -3,13 +3,13 @@ Test data for testing running HTTP with form kind is file (uploading file). >>> valid:http_request_body { "Target": { - "id": "target_http" + "id": "example_http" }, "HTTPTarget": { - "id": "upload", + "id": "http_upload", "Method": 6, "RequestType": 3, - "Path": "/upload", + "Path": "/example/upload", "Params": { "file": { "kind": "file", @@ -24,7 +24,7 @@ Test data for testing running HTTP with form kind is file (uploading file). <<< valid:RunResponse.DumpResponse HTTP/1.1 200 OK -Content-Length: 260 +Content-Length: 256 Content-Type: application/json { @@ -35,14 +35,14 @@ Content-Type: application/json "filemodms": [ "0" ], - "filename": [ - "test.txt" - ], "filesize": [ "22" ], "filetype": [ "text/plain" + ], + "name": [ + "test.txt" ] }, "code": 200 diff --git a/testdata/target_http_run_withrawbody_json_test.txt b/testdata/target_http_run_withrawbody_json_test.txt index c332987..4666b0e 100644 --- a/testdata/target_http_run_withrawbody_json_test.txt +++ b/testdata/target_http_run_withrawbody_json_test.txt @@ -3,21 +3,21 @@ Test data for testing [HTTPTarget.WithRawBody]. >>> valid:http_request_body { "Target": { - "id": "target_http" + "id": "example_http" }, "HTTPTarget": { - "id": "rawbody_json", + "id": "http_rawbody_json", "Method": 6, "RequestType": 4, - "Path": "/rawbody/json", + "Path": "/example/rawbody/json", "RawBody": "eyJpZCI6MSwibmFtZSI6ImdvcmFua3VzdSJ9", "WithRawBody": true } } <<< valid:RunResponse.DumpRequest -POST /rawbody/json HTTP/1.1 -Host: 127.0.0.1:22796 +POST /example/rawbody/json HTTP/1.1 +Host: 127.0.0.1:8217 User-Agent: libhttp/0.53.0 Content-Length: 27 Content-Type: application/json |
