migration_test.go 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Copyright 2015 CoreOS, Inc.
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. package integration
  15. import (
  16. "os/exec"
  17. "testing"
  18. "github.com/coreos/etcd/pkg/testutil"
  19. )
  20. func TestUpgradeMember(t *testing.T) {
  21. defer testutil.AfterTest(t)
  22. m := mustNewMember(t, "integration046", nil, nil)
  23. cmd := exec.Command("cp", "-r", "testdata/integration046_data/conf", "testdata/integration046_data/log", "testdata/integration046_data/snapshot", m.DataDir)
  24. err := cmd.Run()
  25. if err != nil {
  26. t.Fatal(err)
  27. }
  28. if err := m.Launch(); err != nil {
  29. t.Fatal(err)
  30. }
  31. defer m.Terminate(t)
  32. m.WaitOK(t)
  33. clusterMustProgress(t, []*member{m})
  34. }