Add config option to enable (m)TLS between Poseidon and Nomad

This commit is contained in:
Jan-Eric Hellenberg
2021-07-27 13:45:46 +02:00
committed by Jan-Eric Hellenberg
parent e2d71a11ad
commit 6a60b6cd89
14 changed files with 134 additions and 98 deletions

View File

@ -6,12 +6,11 @@ import (
context "context"
api "github.com/hashicorp/nomad/api"
config "gitlab.hpi.de/codeocean/codemoon/poseidon/internal/config"
io "io"
mock "github.com/stretchr/testify/mock"
url "net/url"
)
// apiQuerierMock is an autogenerated mock type for the apiQuerier type
@ -202,13 +201,13 @@ func (_m *apiQuerierMock) allocation(jobID string) (*api.Allocation, error) {
return r0, r1
}
// init provides a mock function with given fields: nomadURL, nomadNamespace, nomadToken
func (_m *apiQuerierMock) init(nomadURL *url.URL, nomadNamespace string, nomadToken string) error {
ret := _m.Called(nomadURL, nomadNamespace, nomadToken)
// init provides a mock function with given fields: nomadConfig
func (_m *apiQuerierMock) init(nomadConfig *config.Nomad) error {
ret := _m.Called(nomadConfig)
var r0 error
if rf, ok := ret.Get(0).(func(*url.URL, string, string) error); ok {
r0 = rf(nomadURL, nomadNamespace, nomadToken)
if rf, ok := ret.Get(0).(func(*config.Nomad) error); ok {
r0 = rf(nomadConfig)
} else {
r0 = ret.Error(0)
}