Remove EtcdURL from APIServer Config
This commit is contained in:
parent
b406414c2a
commit
fe4e62dc59
|
|
@ -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"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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")))
|
||||||
|
|
|
||||||
|
|
@ -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 {
|
||||||
|
|
|
||||||
|
|
@ -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{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue