-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Endpoints are not longer supported Remove all references to endpoints in the CLI.
- Loading branch information
Showing
37 changed files
with
23 additions
and
1,760 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,26 +44,27 @@ func TestDescribeAPIArgs(t *testing.T) { | |
err: errors.New("requires METHOD and PATH"), | ||
}, | ||
{ | ||
args: []string{"GET", "/v1/endpoints"}, | ||
args: []string{"GET", "/v1/resources"}, | ||
err: nil, | ||
method: "GET", | ||
path: "/v1/endpoints", | ||
path: "/v1/resources", | ||
}, | ||
{ | ||
args: []string{"get", "/v1/endpoints"}, // lowercase | ||
args: []string{"get", "/v1/resources"}, // lowercase | ||
err: nil, | ||
method: "GET", | ||
path: "/v1/endpoints", | ||
path: "/v1/resources", | ||
}, | ||
{ | ||
args: []string{ | ||
"POST", | ||
"/v1/endpoints", | ||
"'{\"protocol\": \"HTTP\", \"stream\": \"resource-2-499379-public.accounts\", \"name\": \"1234\"}'"}, | ||
"/v1/resources", | ||
`'{"type":"postgres", "name":"pg", "url":"postgres://u:[email protected]:5432/db"}'`, | ||
}, | ||
err: nil, | ||
method: "POST", | ||
path: "/v1/endpoints", | ||
body: "'{\"protocol\": \"HTTP\", \"stream\": \"resource-2-499379-public.accounts\", \"name\": \"1234\"}'", | ||
path: "/v1/resources", | ||
body: `'{"type":"postgres", "name":"pg", "url":"postgres://u:[email protected]:5432/db"}'`, | ||
}, | ||
} | ||
|
||
|
@@ -107,6 +108,7 @@ func TestAPIExecution(t *testing.T) { | |
var httpResponse = &http.Response{ | ||
Status: "200 OK", | ||
StatusCode: 200, | ||
Proto: "HTTP/1.1", | ||
Body: io.NopCloser(bytes.NewReader([]byte(bodyResponse))), | ||
} | ||
|
||
|
@@ -133,9 +135,9 @@ func TestAPIExecution(t *testing.T) { | |
|
||
gotLeveledOutput := logger.LeveledOutput() | ||
wantLeveledOutput := fmt.Sprintf(`> %s %s | ||
< %s | ||
< %s %s | ||
%s | ||
`, a.args.Method, a.args.Path, httpResponse.Status, expectedBody) | ||
`, a.args.Method, a.args.Path, httpResponse.Status, httpResponse.Proto, expectedBody) | ||
|
||
if gotLeveledOutput != wantLeveledOutput { | ||
t.Fatalf("expected output:\n%s\ngot:\n%s", wantLeveledOutput, gotLeveledOutput) | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.