mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Update references remove refs to treeder oracle funcy (#376)
* Remove lots of refs to iron and funcy oracle etc.. * more ref replacements * Replacing more refs. Treeder * Use Fn not FN
This commit is contained in:
committed by
Travis Reeder
parent
5219227393
commit
c7f3066c75
@@ -1,4 +1,4 @@
|
||||
FROM funcy/ruby:dev
|
||||
FROM fnproject/ruby:dev
|
||||
|
||||
WORKDIR /function
|
||||
ADD Gemfile* /function/
|
||||
|
||||
@@ -4,7 +4,7 @@ This images compares the payload info with the header.
|
||||
|
||||
## Requirements
|
||||
|
||||
- Oracle Functions API
|
||||
- Fn API
|
||||
|
||||
## Development
|
||||
|
||||
@@ -35,7 +35,7 @@ docker push $USERNAME/func-checker
|
||||
./test.sh
|
||||
```
|
||||
|
||||
## Running it on Oracle Functions
|
||||
## Running it on Fn
|
||||
|
||||
### Let's define some environment variables
|
||||
|
||||
@@ -45,7 +45,7 @@ docker push $USERNAME/func-checker
|
||||
FUNCAPI=YOUR_FUNCTIONS_ADDRESS
|
||||
```
|
||||
|
||||
### Running with Oracle Functions
|
||||
### Running with Fn
|
||||
|
||||
With this command we are going to create an application with name `checker`.
|
||||
|
||||
@@ -71,7 +71,7 @@ curl -X POST --data '{
|
||||
|
||||
#### Testing function
|
||||
|
||||
Now that we created our Oracle Functions route, let's test our new route
|
||||
Now that we created our Fn route, let's test our new route
|
||||
|
||||
```
|
||||
curl -X POST --data '{ "env_vars": { "test": "1" } }' http://$FUNCAPI/r/checker/check
|
||||
|
||||
@@ -8,23 +8,23 @@ puts "payload #{payload}"
|
||||
p ENV
|
||||
if payload != ""
|
||||
payload = JSON.parse(payload)
|
||||
|
||||
|
||||
# payload contains checks
|
||||
if payload["env_vars"]
|
||||
if payload["env_vars"]
|
||||
payload["env_vars"].each do |k,v|
|
||||
if ENV[k] != v
|
||||
if ENV[k] != v
|
||||
raise "Env var #{k} does not match"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
puts "all good"
|
||||
end
|
||||
|
||||
# Also check for expected env vars: https://gitlab.oracledx.com/odx/functions/blob/master/docs/writing.md#inputs
|
||||
# Also check for expected env vars: https://github.com/fnproject/fn/blob/master/docs/writing.md#inputs
|
||||
e = ENV["FN_REQUEST_URL"]
|
||||
puts e
|
||||
uri = URI.parse(e)
|
||||
if !uri.scheme.start_with?('http')
|
||||
if !uri.scheme.start_with?('http')
|
||||
raise "invalid REQUEST_URL, does not start with http"
|
||||
end
|
||||
e = ENV["FN_METHOD"]
|
||||
|
||||
Reference in New Issue
Block a user