2015-01-25 06:19:16 +03:00
|
|
|
// Copyright 2015 CoreOS, Inc.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
|
2014-11-20 23:37:15 +03:00
|
|
|
package integration
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os/exec"
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestUpgradeMember(t *testing.T) {
|
|
|
|
defer afterTest(t)
|
2015-03-31 08:40:23 +03:00
|
|
|
m := mustNewMember(t, "integration046", false)
|
2015-03-31 09:31:46 +03:00
|
|
|
cmd := exec.Command("cp", "-r", "testdata/integration046_data/conf", "testdata/integration046_data/log", "testdata/integration046_data/snapshot", m.DataDir)
|
|
|
|
err := cmd.Run()
|
2014-11-20 23:37:15 +03:00
|
|
|
if err != nil {
|
|
|
|
t.Fatal(err)
|
|
|
|
}
|
2015-03-31 09:31:46 +03:00
|
|
|
if err := m.Launch(); err != nil {
|
2014-11-20 23:37:15 +03:00
|
|
|
t.Fatal(err)
|
|
|
|
}
|
2015-03-31 09:31:46 +03:00
|
|
|
defer m.Terminate(t)
|
|
|
|
m.WaitOK(t)
|
2014-11-20 23:37:15 +03:00
|
|
|
|
2015-03-31 09:31:46 +03:00
|
|
|
clusterMustProgress(t, []*member{m})
|
2014-11-20 23:37:15 +03:00
|
|
|
}
|