Remove EtcdURL from APIServer Config

This commit is contained in:
Hannes Hörl 2017-12-11 12:02:07 +00:00 committed by Gareth Smith
parent b406414c2a
commit fe4e62dc59
4 changed files with 0 additions and 5 deletions

View File

@ -4,7 +4,6 @@ import "github.com/asaskevich/govalidator"
// APIServerConfig is a struct holding data to configure the API Server process // APIServerConfig is a struct holding data to configure the API Server process
type APIServerConfig struct { type APIServerConfig struct {
EtcdURL string `valid:"url"`
APIServerURL string `valid:"required,url"` APIServerURL string `valid:"required,url"`
} }

View File

@ -11,7 +11,6 @@ var _ = Describe("APIServerConfig", func() {
It("does not error on valid config", func() { It("does not error on valid config", func() {
conf := &APIServerConfig{ conf := &APIServerConfig{
APIServerURL: "http://this.is.some.url:1234", APIServerURL: "http://this.is.some.url:1234",
EtcdURL: "http://this.is.another.url/with/a/path/we/dont/care/about",
} }
err := conf.Validate() err := conf.Validate()
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
@ -26,7 +25,6 @@ var _ = Describe("APIServerConfig", func() {
It("errors on malformed URLs", func() { It("errors on malformed URLs", func() {
conf := &APIServerConfig{ conf := &APIServerConfig{
APIServerURL: "something not URLish", APIServerURL: "something not URLish",
EtcdURL: "something not URLesc",
} }
err := conf.Validate() err := conf.Validate()
Expect(err).To(MatchError(ContainSubstring("APIServerURL: something not URLish does not validate as url"))) Expect(err).To(MatchError(ContainSubstring("APIServerURL: something not URLish does not validate as url")))

View File

@ -16,7 +16,6 @@ var _ = Describe("NewAPIServer", func() {
It("can construct a properly configured APIServer", func() { It("can construct a properly configured APIServer", func() {
config := &APIServerConfig{ config := &APIServerConfig{
EtcdURL: "some etcd URL",
APIServerURL: "some APIServer URL", APIServerURL: "some APIServer URL",
} }
apiServerBinPathFinder = func(name string) string { apiServerBinPathFinder = func(name string) string {

View File

@ -30,7 +30,6 @@ var _ = Describe("Apiserver", func() {
fakeEtcdProcess = &testfakes.FakeFixtureProcess{} fakeEtcdProcess = &testfakes.FakeFixtureProcess{}
apiServerConfig = &APIServerConfig{ apiServerConfig = &APIServerConfig{
EtcdURL: "http://this.is.etcd:2345/",
APIServerURL: "http://this.is.the.API.server:8080", APIServerURL: "http://this.is.the.API.server:8080",
} }
apiServer = &APIServer{ apiServer = &APIServer{