Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: return correct not found for disconnected client and fix tests #90

Merged
merged 1 commit into from
Jan 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ autopush_rs/target
autopush_rs/_native*
target
*.rs.bk
requirements.txt
test-requirements.txt
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ dist: trusty

install:
- make ddb
- curl https://raw.githubusercontent.com/mozilla-services/autopush/master/requirements.txt > requirements.txt
- curl https://raw.githubusercontent.com/mozilla-services/autopush/master/test-requirements.txt > test-requirements.txt
- pip install --upgrade pip
- pip install bottle
- pip install -r requirements.txt
- pip install -r test-requirements.txt
- pip install -e git+https://github.com/mozilla-services/autopush.git#egg=autopush
Expand Down
62 changes: 0 additions & 62 deletions requirements.txt

This file was deleted.

4 changes: 2 additions & 2 deletions src/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl Service for Push {
Ok(hyper::Response::new().with_status(StatusCode::Ok))
} else {
Ok(hyper::Response::new()
.with_status(StatusCode::BadGateway)
.with_status(StatusCode::NotFound)
bbangert marked this conversation as resolved.
Show resolved Hide resolved
.with_body("Client not available."))
}
} else {
Expand All @@ -71,7 +71,7 @@ impl Service for Push {
if srv.check_client_storage(uaid).is_ok() {
response.set_status(StatusCode::Ok)
} else {
response.set_status(StatusCode::BadGateway);
response.set_status(StatusCode::NotFound);
response.set_body("Client not available.");
}
}
Expand Down
15 changes: 0 additions & 15 deletions test-requirements.txt

This file was deleted.