Fix Golangci-lint configuration

This commit is contained in:
Maximilian Paß
2024-05-07 12:11:25 +02:00
parent 8c5e0e11f7
commit ec3b2a93db
6 changed files with 42 additions and 33 deletions

View File

@ -27,12 +27,15 @@ const (
DefaultMockID = "m0ck-1d"
ShortTimeout = 100 * time.Millisecond
DefaultTestTimeout = 10 * time.Minute
defaultPort = 42
anotherPort = 1337
)
var (
ErrDefault = errors.New("an error occurred")
ErrCleanupDestroyReason = errors.New("destruction required for cleanup")
DefaultPortMappings = []nomadApi.PortMapping{{To: 42, Value: 1337, Label: "lit", HostIP: "127.0.0.1"}}
DefaultMappedPorts = []*dto.MappedPort{{ExposedPort: 42, HostAddress: "127.0.0.1:1337"}}
DefaultPortMappings = []nomadApi.PortMapping{{To: defaultPort, Value: anotherPort, Label: "lit", HostIP: "127.0.0.1"}}
DefaultMappedPorts = []*dto.MappedPort{{ExposedPort: defaultPort, HostAddress: "127.0.0.1:1337"}}
)

View File

@ -16,10 +16,13 @@ var log = logging.GetLogger("e2e-helpers")
func CreateDefaultEnvironment(prewarmingPoolSize uint, image string) dto.ExecutionEnvironmentRequest {
path := helpers.BuildURL(api.BasePath, api.EnvironmentsPath, tests.DefaultEnvironmentIDAsString)
const smallCPULimit uint = 20
const smallMemoryLimit uint = 100
defaultNomadEnvironment := dto.ExecutionEnvironmentRequest{
PrewarmingPoolSize: prewarmingPoolSize,
CPULimit: 20,
MemoryLimit: 100,
CPULimit: smallCPULimit,
MemoryLimit: smallMemoryLimit,
Image: image,
NetworkAccess: false,
ExposedPorts: nil,