diff --git a/Makefile b/Makefile index 0e2a2f3ac..fd4280755 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ checkfmt: clear-images: -docker images -q -f dangling=true | xargs docker rmi -f - for i in fnproject/fn-test-utils fnproject/hello fnproject/error fnproject/sleeper fnproject/error \ + for i in fnproject/fn-test-utils fnproject/hello fnproject/error \ fnproject/dind fnproject/fnserver fnproject/fnlb; do \ docker images "$$i" --format '{{ .ID }}\t{{ .Repository }}\t{{ .Tag}}' | while read id repo tag; do \ if [ "$$tag" = "" ]; then docker rmi "$$id"; else docker rmi "$$repo:$$tag"; fi; done; done @@ -56,8 +56,6 @@ build-static: full-test: build-static test test-api -img-sleeper: - docker pull fnproject/sleeper img-error: docker pull fnproject/error img-hello: @@ -69,7 +67,7 @@ img-postgres: img-minio: docker pull minio/minio -pull-images: img-sleeper img-error img-hello img-mysql img-postgres img-minio +pull-images: img-error img-hello img-mysql img-postgres img-minio test-datastore: cd api/datastore && go test -v ./... diff --git a/api/agent/agent_test.go b/api/agent/agent_test.go index 6ac0382e9..7151efcd1 100644 --- a/api/agent/agent_test.go +++ b/api/agent/agent_test.go @@ -61,8 +61,8 @@ func checkExpectedHeaders(t *testing.T, expectedHeaders http.Header, receivedHea func TestCallConfigurationRequest(t *testing.T) { appName := "myapp" - path := "/sleeper" - image := "fnproject/sleeper" + path := "/" + image := "fnproject/fn-test-utils" const timeout = 1 const idleTimeout = 20 const memory = 256 @@ -192,8 +192,8 @@ func TestCallConfigurationRequest(t *testing.T) { func TestCallConfigurationModel(t *testing.T) { appName := "myapp" - path := "/sleeper" - image := "fnproject/sleeper" + path := "/" + image := "fnproject/fn-test-utils" const timeout = 1 const idleTimeout = 20 const memory = 256 @@ -253,8 +253,8 @@ func TestCallConfigurationModel(t *testing.T) { func TestAsyncCallHeaders(t *testing.T) { appName := "myapp" - path := "/sleeper" - image := "fnproject/sleeper" + path := "/" + image := "fnproject/fn-test-utils" const timeout = 1 const idleTimeout = 20 const memory = 256 @@ -526,10 +526,10 @@ func TestGetCallReturnsResourceImpossibility(t *testing.T) { } } -// return a model with all fields filled in with fnproject/sleeper image, change as needed +// return a model with all fields filled in with fnproject/fn-test-utils:latest image, change as needed func testCall() *models.Call { appName := "myapp" - path := "/sleeper" + path := "/" image := "fnproject/fn-test-utils:latest" const timeout = 10 const idleTimeout = 20 diff --git a/images/sleeper/.gitignore b/images/sleeper/.gitignore deleted file mode 100644 index e715a8a80..000000000 --- a/images/sleeper/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -bundle/ -.bundle/ diff --git a/images/sleeper/Dockerfile b/images/sleeper/Dockerfile deleted file mode 100644 index cf4699ac2..000000000 --- a/images/sleeper/Dockerfile +++ /dev/null @@ -1,9 +0,0 @@ -FROM fnproject/ruby:dev - -WORKDIR /function -ADD Gemfile* /function/ -RUN bundle install - -ADD . /function/ - -ENTRYPOINT ["ruby", "func.rb"] diff --git a/images/sleeper/Gemfile b/images/sleeper/Gemfile deleted file mode 100644 index e05a90012..000000000 --- a/images/sleeper/Gemfile +++ /dev/null @@ -1,3 +0,0 @@ -source 'https://rubygems.org' - -gem 'json', '> 1.8.2' diff --git a/images/sleeper/README.md b/images/sleeper/README.md deleted file mode 100644 index 5a9137de3..000000000 --- a/images/sleeper/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# Sleeper Function Image - -This function sleeps for some number of seconds that you pass in. - -Test it with: - -```sh -fn build -echo '{"sleep": 5}' | fn run -``` diff --git a/images/sleeper/func.rb b/images/sleeper/func.rb deleted file mode 100644 index 41100e990..000000000 --- a/images/sleeper/func.rb +++ /dev/null @@ -1,16 +0,0 @@ -require 'json' - -payload = STDIN.read -if payload != "" - payload = JSON.parse(payload) - - # payload contains checks - if payload["sleep"] - i = payload['sleep'].to_i - STDERR.puts "Sleeping for #{i} seconds..." - sleep i - puts "I'm awake!" # sending this to stdout for sync response - end -else - puts "ERROR: please pass in a sleep value: {\"sleep\": 5}" -end diff --git a/images/sleeper/func.yaml b/images/sleeper/func.yaml deleted file mode 100644 index 8a171e3cd..000000000 --- a/images/sleeper/func.yaml +++ /dev/null @@ -1,2 +0,0 @@ -name: fnproject/sleeper -version: 0.0.4 diff --git a/images/sleeper/release.sh b/images/sleeper/release.sh deleted file mode 100755 index 9a7bcf392..000000000 --- a/images/sleeper/release.sh +++ /dev/null @@ -1,5 +0,0 @@ -set -e - -docker build -t fnproject/sleeper:latest . - -docker push fnproject/sleeper:latest