Revert "etcdhttp: add internalVersion"

This reverts commit a77bf97c147a93e5b78898b427d081ba11b8f118.

Conflicts:
	version/version.go

Conflicts:
	version/version.go
This commit is contained in:
Yicheng Qin 2015-03-27 16:53:55 -07:00
parent 229405f113
commit 9995e80a2c
3 changed files with 3 additions and 4 deletions

View File

@ -334,7 +334,7 @@ func serveVersion(w http.ResponseWriter, r *http.Request) {
if !allowMethod(w, r.Method, "GET") {
return
}
fmt.Fprintf(w, `{"releaseVersion":"%s","internalVersion":"%s"}`, version.Version, version.InternalVersion)
w.Write([]byte("etcd " + version.Version))
}
// parseKeyRequest converts a received http.Request on keysPrefix to

View File

@ -1327,7 +1327,7 @@ func TestServeVersion(t *testing.T) {
if rw.Code != http.StatusOK {
t.Errorf("code=%d, want %d", rw.Code, http.StatusOK)
}
w := fmt.Sprintf(`{"releaseVersion":"%s","internalVersion":"%s"}`, version.Version, version.InternalVersion)
w := fmt.Sprintf("etcd %s", version.Version)
if g := rw.Body.String(); g != w {
t.Fatalf("body = %q, want %q", g, w)
}

View File

@ -23,8 +23,7 @@ import (
)
var (
Version = "2.0.7+git"
InternalVersion = "2"
Version = "2.0.7+git"
)
// WalVersion is an enum for versions of etcd logs.