openfaas / faas-cli

Official CLI for OpenFaaS
https://www.openfaas.com/
Other
798 stars 225 forks source link

Homebrew test block fails with 0.4.18c #175

Closed ilovezfs closed 7 years ago

ilovezfs commented 7 years ago
Error Message

failed: brew test faas-cli --verbose

Stacktrace

        Testing faas-cli
/usr/bin/sandbox-exec -f /tmp/homebrew20171016-52185-1iss9be.sb /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -W0 -I /usr/local/Homebrew/Library/Homebrew -- /usr/local/Homebrew/Library/Homebrew/test.rb /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/faas-cli.rb --verbose
==> /usr/local/Cellar/faas-cli/0.4.18c/bin/faas-cli deploy -yaml test.yml
Error: faas-cli: failed
<"Deploying: dummy_function.\nRemoving old service.\nDeployed.\nURL: http://localhost:65020/function/dummy_function\n\n200 OK\n"> expected but was
<"Deploying: dummy_function.\nError removing existing function: Delete http://localhost:8080/system/functions: dial tcp [::1]:8080: getsockopt: connection refused, gateway=http://localhost:8080, functionName=dummy_function\nIs FaaS deployed? Do you need to specify the --gateway flag?\nPost http://localhost:8080/system/functions: dial tcp [::1]:8080: getsockopt: connection refused\n">.

diff:
  Deploying: dummy_function.
+ Error removing existing function: Delete http://localhost:8080/system/functions: dial tcp [::1]:8080: getsockopt: connection refused, gateway=http://localhost:8080, functionName=dummy_function
+ Is FaaS deployed? Do you need to specify the --gateway flag?
+ Post http://localhost:8080/system/functions: dial tcp [::1]:8080: getsockopt: connection refused
- Removing old service.
- Deployed.
- URL: http://localhost:65020/function/dummy_function
- 
- 200 OK

folded diff:
  Deploying: dummy_function.
- Removing old service.
- Deployed.
- URL: http://localhost:65020/function/dummy_function
- 
- 200 OK
+ Error removing existing function: Delete http://localhost:8080/system/function
+ s: dial tcp [::1]:8080: getsockopt: connection refused, gateway=http://localho
+ st:8080, functionName=dummy_function
+ Is FaaS deployed? Do you need to specify the --gateway flag?
+ Post http://localhost:8080/system/functions: dial tcp [::1]:8080: getsockopt: 
+ connection refused

Expected Behaviour

The test block to pass, as it does with 0.4.18b

Current Behaviour

The test block fails.

Possible Solution

Steps to Reproduce (for bugs)

https://jenkins.brew.sh/job/Homebrew%20Core%20Pull%20Requests/11005/version=high_sierra/testReport/junit/brew-test-bot/high_sierra/test_faas_cli/

Context

Trying to upgrade the Homebrew formula to 0.4.18c: https://github.com/Homebrew/homebrew-core/pull/19499

Your Environment

ilovezfs commented 7 years ago

CC @johnmccabe @alexellis

johnmccabe commented 7 years ago

Derek add label: bug

johnmccabe commented 7 years ago

Thanks @ilovezfs.

@alexellis we should have a look at ensuring the brew test is also executed as part of CI here to prevent this happening again in future.

ilovezfs commented 7 years ago

That would be great! :)

johnmccabe commented 7 years ago

@ilovezfs I don't suppose you've come across any existing projects that already do so? Ideally I'd like to be able to run the same tests in both homebrew-core and this repo - avoid having two places to sync.

ilovezfs commented 7 years ago

Not off the top of my head but something like this is probably still viable https://stackoverflow.com/questions/20396325/using-travis-ci-to-test-homebrew-tap

ilovezfs commented 7 years ago

You could also just run test-bot.

See https://github.com/dunn/homebrew-emacs/blob/master/.travis.yml

ilovezfs commented 7 years ago

and https://github.com/Linuxbrew/homebrew-core/blob/master/.travis.yml

johnmccabe commented 7 years ago

@ilovezfs @alexellis has unblocked things for the moment with #174 and a bumped release at Homebrew/homebrew-core#19508

ilovezfs commented 7 years ago

Thanks for the fix. Please let me know if you run into any problems with getting brew test or brew test-bot working in Travis.