forked from distribworks/dkron
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
1,234 additions
and
158 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
language: go | ||
|
||
go: | ||
- 1.5 | ||
|
||
# let us have speedy Docker-based Travis workers | ||
# http://docs.travis-ci.com/user/migrating-from-legacy/#tl%3Bdr | ||
sudo: false | ||
|
||
before_install: | ||
- go get golang.org/x/tools/cmd/vet | ||
- go get golang.org/x/tools/cmd/cover | ||
- go get github.com/mattn/goveralls | ||
- go get github.com/golang/lint/golint | ||
- go get github.com/GeertJohan/fgt | ||
|
||
before_script: | ||
- scripts/travis_etcd.sh 2.1.1 | ||
|
||
script: | ||
- ./etcd/etcd >/dev/null 2>&1 & | ||
- scripts/validate-gofmt | ||
- go vet ./... | ||
# - fgt golint ./... | ||
- go test -v ./dkron |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
## 0.0.4 (2015-08-23) | ||
|
||
- Compiled with Go 1.5 | ||
- Includes cluster nodes view in the UI | ||
|
||
## 0.0.3 (2015-08-20) | ||
|
||
- Initial release |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
etc: bin/etcd -name dcron1 | ||
dkron2: godep go run *.go agent -server -node=dkron2 -join=127.0.0.1:5002 -bind=127.0.0.1:5001 -http-addr=:8081 | ||
dkron3: godep go run *.go agent -server -node=dkron3 -join=127.0.0.1:5001 -bind=127.0.0.1:5002 -http-addr=:8082 | ||
dkron2: godep go run *.go agent -server -node=dkron2 -join=127.0.0.1:5002 -bind=127.0.0.1:5001 -http-addr=:8080 | ||
dkron3: godep go run *.go agent -server -node=dkron3 -join=127.0.0.1:5001 -bind=127.0.0.1:5002 -http-addr=:8081 |
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
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 |
---|---|---|
|
@@ -40,7 +40,7 @@ func setupAPITest(t *testing.T) (chan<- struct{}, <-chan int) { | |
return shutdownCh, resultCh | ||
} | ||
|
||
func TestAPIJobReschedule(t *testing.T) { | ||
func TestAPIJobCreate(t *testing.T) { | ||
shutdownCh, _ := setupAPITest(t) | ||
|
||
var jsonStr = []byte(`{"name": "test_job", "schedule": "@every 2s", "command": "date", "owner": "mec", "owner_email": "[email protected]", "disabled": true}`) | ||
|
@@ -51,8 +51,8 @@ func TestAPIJobReschedule(t *testing.T) { | |
defer resp.Body.Close() | ||
body, _ := ioutil.ReadAll(resp.Body) | ||
|
||
if string(body) != `{"result": "ok"}` { | ||
t.Fatalf("error saving job: %", string(body)) | ||
if bytes.Equal(body, jsonStr) { | ||
t.Fatalf("error saving job: %s", string(body)) | ||
} | ||
|
||
// Send a shutdown request | ||
|
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
Oops, something went wrong.