Browse Source

Revert "etcdhttp: add internalVersion"

This reverts commit a77bf97c147a93e5b78898b427d081ba11b8f118.

Conflicts:
	version/version.go
Yicheng Qin 10 years ago
parent
commit
60efd4d96e
3 changed files with 3 additions and 4 deletions
  1. 1 1
      etcdserver/etcdhttp/client.go
  2. 1 1
      etcdserver/etcdhttp/client_test.go
  3. 1 2
      version/version.go

+ 1 - 1
etcdserver/etcdhttp/client.go

@@ -359,7 +359,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

+ 1 - 1
etcdserver/etcdhttp/client_test.go

@@ -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)
 	}

+ 1 - 2
version/version.go

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