Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
luke-lombardi committed Oct 30, 2024
1 parent f2a991d commit 8258e20
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pkg/abstractions/endpoint/autoscaler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ func TestDeploymentScaleFuncWithDefaults(t *testing.T) {
ExternalId: "test",
},
},
AppConfig: types.AppConfig{},
}
autoscaledInstance.AppConfig.GatewayService = types.GatewayServiceConfig{
StubLimits: types.StubLimits{
MaxReplicas: 10,
},
}
autoscaledInstance.StubConfig = &types.StubConfigV1{}
autoscaledInstance.StubConfig.Autoscaler = &types.Autoscaler{
Expand Down Expand Up @@ -64,6 +70,13 @@ func TestDeploymentScaleFuncWithMaxTasksPerContainer(t *testing.T) {
ExternalId: "test",
},
},
AppConfig: types.AppConfig{},
}

autoscaledInstance.AppConfig.GatewayService = types.GatewayServiceConfig{
StubLimits: types.StubLimits{
MaxReplicas: 10,
},
}
autoscaledInstance.StubConfig = &types.StubConfigV1{}
autoscaledInstance.StubConfig.Autoscaler = &types.Autoscaler{
Expand Down
12 changes: 12 additions & 0 deletions pkg/abstractions/taskqueue/autoscaler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ func TestDeploymentScaleFuncWithDefaults(t *testing.T) {
MaxContainers: 1,
TasksPerContainer: 1,
}
autoscaledInstance.AppConfig = types.AppConfig{}
autoscaledInstance.AppConfig.GatewayService = types.GatewayServiceConfig{
StubLimits: types.StubLimits{
MaxReplicas: 10,
},
}

instance := &taskQueueInstance{}
instance.AutoscaledInstance = autoscaledInstance
Expand Down Expand Up @@ -56,6 +62,12 @@ func TestDeploymentScaleFuncWithMaxTasksPerContainer(t *testing.T) {
MaxContainers: 3,
TasksPerContainer: 1,
}
autoscaledInstance.AppConfig = types.AppConfig{}
autoscaledInstance.AppConfig.GatewayService = types.GatewayServiceConfig{
StubLimits: types.StubLimits{
MaxReplicas: 10,
},
}

// Make sure we scale up to max containers
instance := &taskQueueInstance{}
Expand Down

0 comments on commit 8258e20

Please sign in to comment.