Add tests for returning mapped ports of runners

This commit is contained in:
sirkrypt0
2021-07-07 15:35:30 +02:00
parent 64764a9809
commit 2f1383b743
5 changed files with 109 additions and 4 deletions

View File

@ -2,6 +2,8 @@ package tests
import (
"errors"
nomadApi "github.com/hashicorp/nomad/api"
"gitlab.hpi.de/codeocean/codemoon/poseidon/api/dto"
"time"
)
@ -28,5 +30,7 @@ const (
)
var (
ErrDefault = errors.New("an error occurred")
ErrDefault = errors.New("an error occurred")
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"}}
)