Skip to content

Commit

Permalink
Rename provider YAML faas to openfaas
Browse files Browse the repository at this point in the history
The provider name value of faas is archaic and should be changed
to openfaas. The CLI code already supports this but the generated
values use the text faas still.

Signed-off-by: Alex Ellis <[email protected]>
  • Loading branch information
alexellis committed Mar 6, 2019
1 parent 753b143 commit bcff3a6
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ Here is an example file using the `stack.yml` file included in the repository.

```yaml
provider:
name: faas
name: openfaas
gateway: http://127.0.0.1:8080

functions:
Expand Down
8 changes: 4 additions & 4 deletions commands/generate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var generateTestcases = []struct {
Name: "Default Namespace and API Version",
Input: `
provider:
name: faas
name: openfaas
gateway: http://127.0.0.1:8080
network: "func_functions"
functions:
Expand Down Expand Up @@ -53,7 +53,7 @@ spec:
Name: "Blank namespace",
Input: `
provider:
name: faas
name: openfaas
gateway: http://127.0.0.1:8080
network: "func_functions"
functions:
Expand All @@ -80,7 +80,7 @@ spec:
Name: "BranchAndSHA Image format",
Input: `
provider:
name: faas
name: openfaas
gateway: http://127.0.0.1:8080
network: "func_functions"
functions:
Expand Down Expand Up @@ -108,7 +108,7 @@ spec:
Name: "Multiple functions",
Input: `
provider:
name: faas
name: openfaas
gateway: http://127.0.0.1:8080
network: "func_functions"
functions:
Expand Down
2 changes: 1 addition & 1 deletion commands/new_function.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ func prepareYAMLContent(appendMode bool, gateway string, function *stack.Functio
if !appendMode {

yamlContent = `provider:
name: faas
name: openfaas
gateway: ` + gateway + `
functions:
` + yamlContent
Expand Down
2 changes: 1 addition & 1 deletion commands/new_function_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func runNewFunctionTest(t *testing.T, nft NewFunctionTest) {
services := *parsedServices

var testServices stack.Services
testServices.Provider = stack.Provider{Name: "faas", GatewayURL: defaultGateway}
testServices.Provider = stack.Provider{Name: "openfaas", GatewayURL: defaultGateway}
if !reflect.DeepEqual(services.Provider, testServices.Provider) {
t.Fatalf("YAML `provider` section was not created correctly for file %s: got %v", funcYAML, services.Provider)
}
Expand Down
2 changes: 1 addition & 1 deletion sample/github_hmac/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.7.5-alpine
FROM golang:1.10-alpine

MAINTAINER [email protected]
ENTRYPOINT []
Expand Down
2 changes: 1 addition & 1 deletion sample/hmac.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
provider:
name: faas
name: openfaas
gateway: http://127.0.0.1:8080

functions:
Expand Down
2 changes: 1 addition & 1 deletion sample/imagemagick/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.6
FROM alpine:3.9

# Alternatively use ADD https:// (which will not be cached by Docker builder)
RUN apk --no-cache add curl ca-certificates imagemagick \
Expand Down
2 changes: 1 addition & 1 deletion stack.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
provider:
name: faas
name: openfaas
gateway: http://127.0.0.1:8080 # can be a remote server
network: "func_functions" # this is optional and defaults to func_functions

Expand Down
8 changes: 4 additions & 4 deletions stack/stack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

const TestData_1 string = `provider:
name: faas
name: openfaas
gateway: http://127.0.0.1:8080
network: "func_functions"
Expand Down Expand Up @@ -44,7 +44,7 @@ functions:
`

const TestData_2 string = `provider:
name: faas
name: openfaas
gateway: http://127.0.0.1:8080
network: "func_functions"
Expand Down Expand Up @@ -335,7 +335,7 @@ func Test_ParseYAMLData_ProviderValues(t *testing.T) {
provider: "faas",
expectedError: "",
file: `provider:
name: faas
name: openfaas
gateway: http://127.0.0.1:8080
network: "func_functions"
`,
Expand All @@ -345,7 +345,7 @@ func Test_ParseYAMLData_ProviderValues(t *testing.T) {
provider: "faas",
expectedError: "",
file: `provider:
name: faas
name: openfaas
gateway: http://127.0.0.1:8080
network: "func_functions"
`,
Expand Down

0 comments on commit bcff3a6

Please sign in to comment.