Skip to content

Commit

Permalink
fix: spell check (#1843)
Browse files Browse the repository at this point in the history
  • Loading branch information
amitksingh1490 authored May 2, 2024
1 parent 1ac42a4 commit 2527699
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 22 deletions.
3 changes: 2 additions & 1 deletion .codespellignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ unit
jsonplaceholder
crate
implementor
implementors
implementors
alo
2 changes: 1 addition & 1 deletion .github/workflows/spell-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ jobs:
- uses: actions/checkout@v4
- uses: codespell-project/actions-codespell@v2
with:
skip: .git,*/package.json,*/package-lock.json,*.lock,.github,.vscode,assets
skip: ".git,*/package.json,*/package-lock.json,*.lock,.github,.vscode,assets, *.snap"
ignore_words_file: .codespellignore
check_hidden: false
4 changes: 2 additions & 2 deletions src/cli/runtime/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ mod tests {

let header_serv = server.mock(|when, then| {
when.method(httpmock::Method::GET).path("/test");
then.status(200).body("Alo");
then.status(200).body("Hello");
});

let native_http = NativeHttp::init(&Default::default(), &Default::default());
Expand All @@ -216,7 +216,7 @@ mod tests {
assert!(result.is_ok());
let response = result.unwrap();
assert_eq!(response.status, reqwest::StatusCode::OK);
assert_eq!(response.body, Bytes::from("Alo"));
assert_eq!(response.body, Bytes::from("Hello"));

header_serv.assert();
}
Expand Down
6 changes: 3 additions & 3 deletions src/grpc/protobuf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,9 @@ impl ProtobufOperation {
)
})?;

let mut ser = serde_json::Serializer::new(vec![]);
message.serialize_with_options(&mut ser, &self.serialize_options)?;
let json = serde_json::from_slice::<T>(ser.into_inner().as_ref())?;
let mut serializer = serde_json::Serializer::new(vec![]);
message.serialize_with_options(&mut serializer, &self.serialize_options)?;
let json = serde_json::from_slice::<T>(serializer.into_inner().as_ref())?;
Ok(json)
}

Expand Down
2 changes: 1 addition & 1 deletion tests/core/snapshots/test-enum-default.md_0.snap
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ expression: response
},
{
"id": 3,
"foo": "ND"
"foo": "NOT_DEFINED"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion tests/core/snapshots/test-enum-default.md_client.snap
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type Query {

enum Status {
DRAFT
ND
NOT_DEFINED
PUBLISHED
}

Expand Down
2 changes: 1 addition & 1 deletion tests/core/snapshots/test-enum-default.md_merged.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ schema @server(port: 8080) @upstream(baseURL: "http://localhost:50051", batch: {

enum Status {
DRAFT
ND
NOT_DEFINED
PUBLISHED
}

Expand Down
2 changes: 1 addition & 1 deletion tests/core/snapshots/test-scalars.md_0.snap
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ expression: response
},
"body": {
"data": {
"email": "alo@valid.com"
"email": "hello@valid.com"
}
}
}
16 changes: 8 additions & 8 deletions tests/execution/test-enum-default.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@ import "google/protobuf/empty.proto";
package news;
enum Status {
PUBLISHED = 0;
DRAFT = 1;
ND = 2;
PUBLISHED = 0;
DRAFT = 1;
NOT_DEFINED = 2;
}
message News {
int32 id = 1;
Status foo = 5;
int32 id = 1;
Status foo = 5;
}
service NewsService {
rpc GetAllNews (google.protobuf.Empty) returns (NewsList) {}
rpc GetAllNews (google.protobuf.Empty) returns (NewsList) {}
}
message NewsList {
repeated News news = 1;
repeated News news = 1;
}
```

Expand All @@ -44,7 +44,7 @@ type Query {
enum Status {
PUBLISHED
DRAFT
ND
NOT_DEFINED
}

type News {
Expand Down
6 changes: 3 additions & 3 deletions tests/execution/test-scalars.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type Query {
- method: POST
url: http://localhost:8000/graphql
body:
query: '{ email(value: "alo@valid.com") }'
query: '{ email(value: "hello@valid.com") }'
- method: POST
url: http://localhost:8000/graphql
body:
Expand All @@ -44,7 +44,7 @@ type Query {
- method: POST
url: http://localhost:8000/graphql
body:
query: '{ email(value: "alo@invalid") }'
query: '{ email(value: "hello@invalid") }'
- method: POST
url: http://localhost:8000/graphql
body:
Expand All @@ -61,5 +61,5 @@ type Query {
- method: POST
url: http://localhost:8000/graphql
body:
query: '{ url(value: "invalidhost") }'
query: '{ url(value: "invalid_host") }'
```

1 comment on commit 2527699

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running 30s test @ http://localhost:8000/graphql

4 threads and 100 connections

Thread Stats Avg Stdev Max +/- Stdev
Latency 7.71ms 3.85ms 129.76ms 76.85%
Req/Sec 3.30k 269.71 3.67k 85.33%

394612 requests in 30.01s, 1.98GB read

Requests/sec: 13150.48

Transfer/sec: 67.50MB

Please sign in to comment.