mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-09-11 05:35:53 +03:00
Fix typos
This commit is contained in:
parent
da233dbd7a
commit
9e3a9ae3b2
@ -23,7 +23,7 @@ $ sudo apt update && sudo apt install ./hurl_4.0.0_amd64.deb
|
||||
|
||||
#### Alpine
|
||||
|
||||
Hurl is available on `testing` chanel.
|
||||
Hurl is available on `testing` channel.
|
||||
|
||||
```shell
|
||||
$ apk add --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing hurl
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Security
|
||||
|
||||
In the [previous part], we have tested our login workflow. So far, we have tested a "simple" form creation: each value of
|
||||
the form is valid and sanitized, but what if the user put invalid data? We're going to test a user acount creation and see
|
||||
the form is valid and sanitized, but what if the user put invalid data? We're going to test a user account creation and see
|
||||
how we can check that our signup workflow is secure.
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@ But server-side validation is critical to secure your app. You must always valid
|
||||
and try to test it.
|
||||
|
||||
As Hurl is not a browser, but merely an HTTP runner on top of [curl], sending and testing invalid data is easy.
|
||||
To do so, we're going to test the _nominal_ user account creation case, then we'll see how to test with invalid datas.
|
||||
To do so, we're going to test the _nominal_ user account creation case, then we'll see how to test with invalid data.
|
||||
|
||||
### Valid user creation
|
||||
|
||||
|
@ -69,10 +69,10 @@ integration tests that we want to execute.
|
||||
- a Flask endpoint (`foo.py`). This is the server side used by the Hurl file. You can add as many assert as you want
|
||||
to test that our Hurl client conforms to what is expected. Generally, each integration test has its own Flask endpoint,
|
||||
even if there is some duplication between tests.
|
||||
- an expected stdout file (`foo.out`). This file is the expected value for stdout. This file is not dependant from the OS, as we
|
||||
want a Hurl file to have the same stdout on any OS. If the stdout have some variant datas (like timestamp for instance), one
|
||||
- an expected stdout file (`foo.out`). This file is the expected value for stdout. This file is not dependent from the OS, as we
|
||||
want a Hurl file to have the same stdout on any OS. If the stdout have some variant data (like timestamp for instance), one
|
||||
can use a patterned expected file, with `~~~` for wildcard matching (`foo.out.pattern`)
|
||||
- an expected stderr file (`foo.err`). This file is the expected value for stderr. This file is not dependant from the OS, as we
|
||||
- an expected stderr file (`foo.err`). This file is the expected value for stderr. This file is not dependent from the OS, as we
|
||||
want a Hurl file to have the same stderr on any OS. Like stdout, stderr expected file can be patterned (`foo.err.pattern`)
|
||||
- an expected exit code (`foo.exit`). This file is the expected value of the script. If absent, the default exit code is 0.
|
||||
- an expected HTML export of the Hurl source file (`foo.html`)
|
||||
|
@ -854,7 +854,7 @@ mod tests {
|
||||
#[test]
|
||||
fn test_redirect_method() {
|
||||
// Status of the response to be redirected | method of the original request | method of the new request
|
||||
let datas = [
|
||||
let data = [
|
||||
(301, "GET", "GET"),
|
||||
(301, "POST", "GET"),
|
||||
(301, "DELETE", "GET"),
|
||||
@ -871,7 +871,7 @@ mod tests {
|
||||
(308, "POST", "POST"),
|
||||
(308, "DELETE", "DELETE"),
|
||||
];
|
||||
for (status, original, redirected) in datas {
|
||||
for (status, original, redirected) in data {
|
||||
assert_eq!(
|
||||
get_redirect_method(status, Method(original.to_string())),
|
||||
Method(redirected.to_string())
|
||||
|
@ -44,7 +44,7 @@ impl Testcase {
|
||||
root.add_attr(Width(width.0.to_string()));
|
||||
root.add_attr(Height(height.0.to_string()));
|
||||
|
||||
// Add symbols fo success and failure icons:
|
||||
// Add symbols for success and failure icons:
|
||||
let symbol = new_success_icon("success");
|
||||
root.add_child(symbol);
|
||||
let symbol = new_failure_icon("failure");
|
||||
|
@ -70,7 +70,7 @@ impl Testcase {
|
||||
root.add_attr(Width(width.0.to_string()));
|
||||
root.add_attr(Height(height.0.to_string()));
|
||||
|
||||
// Add styles, filters, symbols fo success and failure icons:
|
||||
// Add styles, filters, symbols for success and failure icons:
|
||||
let elt = svg::new_style(include_str!("../resources/waterfall.css"));
|
||||
root.add_child(elt);
|
||||
let elt = new_filters();
|
||||
@ -315,7 +315,7 @@ fn new_call_tooltip(
|
||||
let offset_y = CALL_HEIGHT * (call_ctx.call_index - 1) + pixels_y.start;
|
||||
let offset_y = offset_y + CALL_HEIGHT - CALL_INSET;
|
||||
let max_width = pixels_x.end - pixels_x.start;
|
||||
// We bound the tooltip background to the overall bouding box.
|
||||
// We bound the tooltip background to the overall bounding box.
|
||||
let offset_x = Pixel::max(offset_x, 6.px());
|
||||
let offset_x = Pixel::min(offset_x, max_width - width - 6.px());
|
||||
|
||||
@ -572,7 +572,7 @@ fn new_filters() -> Element {
|
||||
}
|
||||
|
||||
impl Microsecond {
|
||||
/// Returns a human readable sting of a microsecond.
|
||||
/// Returns a human readable string of a microsecond.
|
||||
fn to_human_string(self) -> String {
|
||||
match self.0 {
|
||||
d if d < 0.0 => "_".to_string(),
|
||||
@ -584,7 +584,7 @@ impl Microsecond {
|
||||
}
|
||||
|
||||
impl Byte {
|
||||
/// Returns a human readable sting of a byte.
|
||||
/// Returns a human readable string of a byte.
|
||||
fn to_human_string(self) -> String {
|
||||
match self.0 {
|
||||
d if d < 0.0 => "_".to_string(),
|
||||
@ -606,7 +606,7 @@ mod tests {
|
||||
fn legend_svg() {
|
||||
let x = 20.px();
|
||||
let y = 30.px();
|
||||
let text = "Hellow world";
|
||||
let text = "Hello world";
|
||||
let color = "red";
|
||||
let duration = Microsecond(2000.0);
|
||||
|
||||
@ -615,7 +615,7 @@ mod tests {
|
||||
elt.to_string(),
|
||||
"<g>\
|
||||
<rect x=\"20\" y=\"30\" width=\"20\" height=\"20\" fill=\"red\" />\
|
||||
<text x=\"56\" y=\"47\" fill=\"#555\">Hellow world</text>\
|
||||
<text x=\"56\" y=\"47\" fill=\"#555\">Hello world</text>\
|
||||
<text x=\"200\" y=\"47\" fill=\"#333\">2.0 ms</text>\
|
||||
</g>"
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user