mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-26 11:51:02 +00:00
updated exiting unit tests. placeholders for new ones
This commit is contained in:
parent
d498f18881
commit
be6f2171fb
1 changed files with 23 additions and 0 deletions
|
@ -108,12 +108,30 @@ func TestSetupEmptyImage(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
// TestSetupErrorInspectImage will test our ability to handle a
|
||||
// failure when inspecting an image (i.e. bradrydzewski/mysql:latest),
|
||||
// which should trigger a `docker pull`.
|
||||
func TestSetupErrorInspectImage(t *testing.T) {
|
||||
t.Skip()
|
||||
}
|
||||
|
||||
// TestSetupErrorPullImage will test our ability to handle a
|
||||
// failure when pulling an image (i.e. bradrydzewski/mysql:latest)
|
||||
func TestSetupErrorPullImage(t *testing.T) {
|
||||
t.Skip()
|
||||
}
|
||||
|
||||
// TestSetupErrorRunDaemonPorts will test our ability to handle a
|
||||
// failure when starting a service (i.e. mysql) as a daemon.
|
||||
func TestSetupErrorRunDaemonPorts(t *testing.T) {
|
||||
setup()
|
||||
defer teardown()
|
||||
|
||||
mux.HandleFunc("/v1.9/images/bradrydzewski/mysql:5.5/json", func(w http.ResponseWriter, r *http.Request) {
|
||||
data := []byte(`{"config": { "ExposedPorts": { "6379/tcp": {}}}}`)
|
||||
w.Write(data)
|
||||
})
|
||||
|
||||
mux.HandleFunc("/v1.9/containers/create", func(w http.ResponseWriter, r *http.Request) {
|
||||
w.WriteHeader(http.StatusBadRequest)
|
||||
})
|
||||
|
@ -139,6 +157,11 @@ func TestSetupErrorServiceInspect(t *testing.T) {
|
|||
setup()
|
||||
defer teardown()
|
||||
|
||||
mux.HandleFunc("/v1.9/images/bradrydzewski/mysql:5.5/json", func(w http.ResponseWriter, r *http.Request) {
|
||||
data := []byte(`{"config": { "ExposedPorts": { "6379/tcp": {}}}}`)
|
||||
w.Write(data)
|
||||
})
|
||||
|
||||
mux.HandleFunc("/v1.9/containers/create", func(w http.ResponseWriter, r *http.Request) {
|
||||
body := `{ "Id":"e90e34656806", "Warnings":[] }`
|
||||
w.Write([]byte(body))
|
||||
|
|
Loading…
Reference in a new issue