diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2020-01-29 15:42:10 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2020-01-29 15:42:10 +0300 |
commit | c48e9460dab192f2ef395bd7f54e102068e54139 (patch) | |
tree | 5aa8a8140c51b64cddb7256b50c62b260dfea7a9 /internal/serving | |
parent | fdf482dd8574695ac93c8240acc4fdf496efba6d (diff) |
Add unit tests for serverless serving function
Diffstat (limited to 'internal/serving')
-rw-r--r-- | internal/serving/serverless/function_test.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/internal/serving/serverless/function_test.go b/internal/serving/serverless/function_test.go new file mode 100644 index 00000000..65d84eb7 --- /dev/null +++ b/internal/serving/serverless/function_test.go @@ -0,0 +1,17 @@ +package serverless + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func TestFunctionHost(t *testing.T) { + function := Function{ + Name: "my-func", + Namespace: "my-namespace-123", + BaseDomain: "knative.example.com", + } + + require.Equal(t, "my-func.my-namespace-123.knative.example.com", function.Host()) +} |