Skip to content

Commit

Permalink
fix deploy and queue tests
Browse files Browse the repository at this point in the history
  • Loading branch information
KauzClay committed Jun 14, 2023
1 parent 7bee1b3 commit 432196e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/reconciler/revision/resources/deploy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
"k8s.io/apimachinery/pkg/util/intstr"
"k8s.io/apimachinery/pkg/util/sets"

netcfg "knative.dev/networking/pkg/config"
netheader "knative.dev/networking/pkg/http/header"
"knative.dev/pkg/kmeta"
"knative.dev/pkg/metrics"
Expand Down Expand Up @@ -188,6 +189,9 @@ var (
}, {
Name: "ENABLE_HTTP2_AUTO_DETECTION",
Value: "false",
}, {
Name: "SECURITY_MODE",
Value: "",
}, {
Name: "ROOT_CA",
Value: "",
Expand Down Expand Up @@ -529,6 +533,7 @@ func TestMakePodSpec(t *testing.T) {
defaults *apicfg.Defaults
dc deployment.Config
fc apicfg.Features
nc netcfg.Config
want *corev1.PodSpec
}{{
name: "user-defined user port, queue proxy have PORT env",
Expand Down Expand Up @@ -1348,6 +1353,7 @@ func TestMakePodSpec(t *testing.T) {
cfg.Observability = &test.oc
cfg.Deployment = &test.dc
cfg.Features = &test.fc
cfg.Network = &test.nc
if test.defaults != nil {
cfg.Defaults = test.defaults
}
Expand Down
3 changes: 3 additions & 0 deletions pkg/reconciler/revision/resources/queue_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ var (
logConfig logging.Config
obsConfig metrics.ObservabilityConfig
traceConfig tracingconfig.Config
netConfig netcfg.Config
defaults, _ = apicfg.NewDefaultsConfigFromMap(nil)
)

Expand Down Expand Up @@ -426,6 +427,7 @@ func TestMakeQueueContainer(t *testing.T) {
Logging: &test.lc,
Observability: &test.oc,
Deployment: &test.dc,
Network: &test.nc,
Config: &apicfg.Config{
Features: &test.fc,
},
Expand Down Expand Up @@ -925,6 +927,7 @@ var defaultEnv = map[string]string{
"REVISION_TIMEOUT_SECONDS": "45",
"REVISION_RESPONSE_START_TIMEOUT_SECONDS": "0",
"REVISION_IDLE_TIMEOUT_SECONDS": "0",
"SECURITY_MODE": "",
"SERVING_CONFIGURATION": "",
"SERVING_ENABLE_PROBE_REQUEST_LOG": "false",
"SERVING_ENABLE_REQUEST_LOG": "false",
Expand Down

0 comments on commit 432196e

Please sign in to comment.