Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2020-01-29 15:42:10 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2020-01-29 15:42:10 +0300
commitc48e9460dab192f2ef395bd7f54e102068e54139 (patch)
tree5aa8a8140c51b64cddb7256b50c62b260dfea7a9
parentfdf482dd8574695ac93c8240acc4fdf496efba6d (diff)
Add unit tests for serverless serving function
-rw-r--r--internal/serving/serverless/function_test.go17
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())
+}