TBR: lib/testutil/integration: renamed to lib/testutil/v23tests
MultiPart: 1/2
- also fix a build breakage in mounttabled/testdata/integration_test
Change-Id: I9bed3ddd73194245b9338c737981032ed35c2c34
diff --git a/lib/testutil/integration/v23tests.go b/lib/testutil/v23tests/v23tests.go
similarity index 98%
rename from lib/testutil/integration/v23tests.go
rename to lib/testutil/v23tests/v23tests.go
index da2ee5e..b85afb6 100644
--- a/lib/testutil/integration/v23tests.go
+++ b/lib/testutil/v23tests/v23tests.go
@@ -42,7 +42,7 @@
// directly as follows:
//
// func TestFoo(t *testing.T) {
-// env := v23Tests.New(t)
+// env := v23tests.New(t)
// defer env.Cleanup()
//
// ...
@@ -68,7 +68,7 @@
// 4. The implementation of this package uses filenames that start with v23test
// to allow for easy tracing with --vmodule=v23test*=2 for example.
//
-package integration
+package v23tests
import (
"bytes"
@@ -708,7 +708,7 @@
return binDir, cleanupFn, nil
}
-// RunTest runs a single Vanadium integration test.
+// RunTest runs a single Vanadium 'v23 style' integration test.
func RunTest(t Test, fn func(i T)) {
if !testutil.IntegrationTestsEnabled {
t.Skip()
@@ -720,6 +720,9 @@
fn(i)
}
+// RunRootMT builds and runs a root mount table instance. It populates
+// the NAMESPACE_ROOT variable in the test environment so that all subsequent
+// invocations will access this root mount table.
func RunRootMT(t T, args ...string) (TestBinary, Invocation) {
b := t.BuildGoPkg("v.io/core/veyron/services/mounttable/mounttabled")
i := b.Start(args...)
diff --git a/lib/testutil/integration/v23tests_test.go b/lib/testutil/v23tests/v23tests_test.go
similarity index 92%
rename from lib/testutil/integration/v23tests_test.go
rename to lib/testutil/v23tests/v23tests_test.go
index 64d8db4..8c0a3d8 100644
--- a/lib/testutil/integration/v23tests_test.go
+++ b/lib/testutil/v23tests/v23tests_test.go
@@ -1,4 +1,4 @@
-package integration_test
+package v23tests_test
import (
"bytes"
@@ -16,7 +16,7 @@
"v.io/core/veyron/lib/expect"
"v.io/core/veyron/lib/modules"
"v.io/core/veyron/lib/testutil"
- "v.io/core/veyron/lib/testutil/integration"
+ "v.io/core/veyron/lib/testutil/v23tests"
_ "v.io/core/veyron/profiles"
)
@@ -24,7 +24,7 @@
// TODO(sjr): need to make sure processes don't get left lying around.
func TestBinaryFromPath(t *testing.T) {
- env := integration.New(t)
+ env := v23tests.New(t)
defer env.Cleanup()
bash := env.BinaryFromPath("/bin/bash")
@@ -41,10 +41,10 @@
}
func TestMountTable(t *testing.T) {
- env := integration.New(t)
+ env := v23tests.New(t)
defer env.Cleanup()
- integration.RunRootMT(env, "--veyron.tcp.address=127.0.0.1:0")
+ v23tests.RunRootMT(env, "--veyron.tcp.address=127.0.0.1:0")
proxyBin := env.BuildGoPkg("v.io/core/veyron/services/proxy/proxyd")
nsBin := env.BuildGoPkg("v.io/core/veyron/tools/namespace")
@@ -83,7 +83,7 @@
// to an instance of testing.T which we obtain via a global variable.
// TODO(cnicolaou): this will need to change once we switch to using
// TestMain.
-func IntegrationTestInChild(i integration.T) {
+func IntegrationTestInChild(i v23tests.T) {
fmt.Println("Hello")
sleep := i.BinaryFromPath("/bin/sleep")
sleep.Start("3600")
@@ -103,7 +103,7 @@
}
func RunIntegrationTestInChild(stdin io.Reader, stdout, stderr io.Writer, env map[string]string, args ...string) error {
- integration.RunTest(globalT, IntegrationTestInChild)
+ v23tests.RunTest(globalT, IntegrationTestInChild)
return nil
}
diff --git a/services/mgmt/application/applicationd/testdata/integration_test.go b/services/mgmt/application/applicationd/testdata/integration_test.go
index 8c90fde..697b482 100644
--- a/services/mgmt/application/applicationd/testdata/integration_test.go
+++ b/services/mgmt/application/applicationd/testdata/integration_test.go
@@ -6,8 +6,8 @@
"strings"
"testing"
- "v.io/core/veyron/lib/testutil/integration"
libsecurity "v.io/core/veyron/lib/testutil/security"
+ "v.io/core/veyron/lib/testutil/v23tests"
_ "v.io/core/veyron/profiles"
vsecurity "v.io/core/veyron/security"
"v.io/core/veyron2/naming"
@@ -19,7 +19,7 @@
"v.io/core/veyron/tools/application",
}
-func helper(t *testing.T, env integration.T, clientBin integration.TestBinary, expectError bool, credentials, cmd string, args ...string) string {
+func helper(t *testing.T, env v23tests.T, clientBin v23tests.TestBinary, expectError bool, credentials, cmd string, args ...string) string {
args = append([]string{"-veyron.credentials=" + credentials, cmd}, args...)
inv := clientBin.Start(args...)
out := inv.Output()
@@ -34,22 +34,22 @@
}
-func matchEnvelope(t *testing.T, env integration.T, clientBin integration.TestBinary, expectError bool, credentials, name, suffix string) string {
+func matchEnvelope(t *testing.T, env v23tests.T, clientBin v23tests.TestBinary, expectError bool, credentials, name, suffix string) string {
return helper(t, env, clientBin, expectError, credentials, "match", naming.Join(name, suffix), "test-profile")
}
-func putEnvelope(t *testing.T, env integration.T, clientBin integration.TestBinary, credentials, name, suffix, envelope string) string {
+func putEnvelope(t *testing.T, env v23tests.T, clientBin v23tests.TestBinary, credentials, name, suffix, envelope string) string {
return helper(t, env, clientBin, false, credentials, "put", naming.Join(name, suffix), "test-profile", envelope)
}
-func removeEnvelope(t *testing.T, env integration.T, clientBin integration.TestBinary, credentials, name, suffix string) string {
+func removeEnvelope(t *testing.T, env v23tests.T, clientBin v23tests.TestBinary, credentials, name, suffix string) string {
return helper(t, env, clientBin, false, credentials, "remove", naming.Join(name, suffix), "test-profile")
}
func TestApplicationRepository(t *testing.T) {
- env := integration.New(t)
+ env := v23tests.New(t)
defer env.Cleanup()
- integration.RunRootMT(env, "--veyron.tcp.address=127.0.0.1:0")
+ v23tests.RunRootMT(env, "--veyron.tcp.address=127.0.0.1:0")
// TODO(sjr): talk to caprita about the necessity/correctness of these.
// Generate credentials.
diff --git a/services/mgmt/binary/binaryd/testdata/integration_test.go b/services/mgmt/binary/binaryd/testdata/integration_test.go
index 337f75f..80e39c1 100644
--- a/services/mgmt/binary/binaryd/testdata/integration_test.go
+++ b/services/mgmt/binary/binaryd/testdata/integration_test.go
@@ -11,8 +11,8 @@
"testing"
"v.io/core/veyron/lib/testutil"
- "v.io/core/veyron/lib/testutil/integration"
"v.io/core/veyron/lib/testutil/security"
+ "v.io/core/veyron/lib/testutil/v23tests"
_ "v.io/core/veyron/profiles"
"v.io/core/veyron2/naming"
)
@@ -48,7 +48,7 @@
}
}
-func deleteFile(env integration.T, clientBin integration.TestBinary, credentials, name, suffix string) {
+func deleteFile(env v23tests.T, clientBin v23tests.TestBinary, credentials, name, suffix string) {
deleteArgs := []string{
"-veyron.credentials=" + credentials,
"delete", naming.Join(name, suffix),
@@ -56,7 +56,7 @@
clientBin.Start(deleteArgs...).WaitOrDie(nil, nil)
}
-func downloadFile(t *testing.T, env integration.T, clientBin integration.TestBinary, expectError bool, credentials, name, path, suffix string) {
+func downloadFile(t *testing.T, env v23tests.T, clientBin v23tests.TestBinary, expectError bool, credentials, name, path, suffix string) {
downloadArgs := []string{
"-veyron.credentials=" + credentials,
"download", naming.Join(name, suffix), path,
@@ -86,7 +86,7 @@
}
}
-func rootURL(t *testing.T, env integration.T, clientBin integration.TestBinary, credentials, name string) string {
+func rootURL(t *testing.T, env v23tests.T, clientBin v23tests.TestBinary, credentials, name string) string {
rootArgs := []string{
"-veyron.credentials=" + credentials,
"url", name,
@@ -94,7 +94,7 @@
return strings.TrimSpace(clientBin.Start(rootArgs...).Output())
}
-func uploadFile(t *testing.T, env integration.T, clientBin integration.TestBinary, credentials, name, path, suffix string) {
+func uploadFile(t *testing.T, env v23tests.T, clientBin v23tests.TestBinary, credentials, name, path, suffix string) {
uploadArgs := []string{
"-veyron.credentials=" + credentials,
"upload", naming.Join(name, suffix), path,
@@ -103,9 +103,9 @@
}
func TestBinaryRepositoryIntegration(t *testing.T) {
- env := integration.New(t)
+ env := v23tests.New(t)
defer env.Cleanup()
- integration.RunRootMT(env, "--veyron.tcp.address=127.0.0.1:0")
+ v23tests.RunRootMT(env, "--veyron.tcp.address=127.0.0.1:0")
// Build the required binaries.
binaryRepoBin := env.BuildGoPkg("v.io/core/veyron/services/mgmt/binary/binaryd")
diff --git a/services/mgmt/build/buildd/testdata/integration_test.go b/services/mgmt/build/buildd/testdata/integration_test.go
index 9089e32..96c0e12 100644
--- a/services/mgmt/build/buildd/testdata/integration_test.go
+++ b/services/mgmt/build/buildd/testdata/integration_test.go
@@ -11,8 +11,8 @@
"testing"
"v.io/core/veyron/lib/modules"
- "v.io/core/veyron/lib/testutil/integration"
"v.io/core/veyron/lib/testutil/security"
+ "v.io/core/veyron/lib/testutil/v23tests"
_ "v.io/core/veyron/profiles"
)
@@ -28,9 +28,9 @@
}
func TestBuildServerIntegration(t *testing.T) {
- env := integration.New(t)
+ env := v23tests.New(t)
defer env.Cleanup()
- integration.RunRootMT(env, "--veyron.tcp.address=127.0.0.1:0")
+ v23tests.RunRootMT(env, "--veyron.tcp.address=127.0.0.1:0")
// Generate credentials.
serverCred, serverPrin := security.NewCredentials("server")
diff --git a/services/mgmt/profile/profiled/testdata/integration_test.go b/services/mgmt/profile/profiled/testdata/integration_test.go
index 324599e..1d76a11 100644
--- a/services/mgmt/profile/profiled/testdata/integration_test.go
+++ b/services/mgmt/profile/profiled/testdata/integration_test.go
@@ -5,12 +5,12 @@
"strings"
"testing"
- "v.io/core/veyron/lib/testutil/integration"
+ "v.io/core/veyron/lib/testutil/v23tests"
_ "v.io/core/veyron/profiles"
"v.io/core/veyron2/naming"
)
-func profileCommandOutput(t *testing.T, env integration.T, profileBin integration.TestBinary, expectError bool, command, name, suffix string) string {
+func profileCommandOutput(t *testing.T, env v23tests.T, profileBin v23tests.TestBinary, expectError bool, command, name, suffix string) string {
labelArgs := []string{
command, naming.Join(name, suffix),
}
@@ -26,14 +26,14 @@
return strings.TrimSpace(out)
}
-func putProfile(t *testing.T, env integration.T, profileBin integration.TestBinary, name, suffix string) {
+func putProfile(t *testing.T, env v23tests.T, profileBin v23tests.TestBinary, name, suffix string) {
putArgs := []string{
"put", naming.Join(name, suffix),
}
profileBin.Start(putArgs...).WaitOrDie(os.Stdout, os.Stderr)
}
-func removeProfile(t *testing.T, env integration.T, profileBin integration.TestBinary, name, suffix string) {
+func removeProfile(t *testing.T, env v23tests.T, profileBin v23tests.TestBinary, name, suffix string) {
removeArgs := []string{
"remove", naming.Join(name, suffix),
}
@@ -41,9 +41,9 @@
}
func TestProfileRepository(t *testing.T) {
- env := integration.New(t)
+ env := v23tests.New(t)
defer env.Cleanup()
- integration.RunRootMT(env, "--veyron.tcp.address=127.0.0.1:0")
+ v23tests.RunRootMT(env, "--veyron.tcp.address=127.0.0.1:0")
// Start the profile repository.
profileRepoName := "test-profile-repo"
diff --git a/services/mounttable/mounttabled/testdata/integration_test.go b/services/mounttable/mounttabled/testdata/integration_test.go
index 367399d..4c9dd9d 100644
--- a/services/mounttable/mounttabled/testdata/integration_test.go
+++ b/services/mounttable/mounttabled/testdata/integration_test.go
@@ -5,10 +5,8 @@
"os"
"regexp"
"testing"
- "time"
- "v.io/core/veyron/lib/expect"
- "v.io/core/veyron/lib/testutil/integration"
+ "v.io/core/veyron/lib/testutil/v23tests"
_ "v.io/core/veyron/profiles/static"
)
@@ -22,18 +20,18 @@
}
func TestMount(t *testing.T) {
- env := integration.New(t)
+ env := v23tests.New(t)
defer env.Cleanup()
neighborhood := fmt.Sprintf("test-%s-%d", getHostname(t), os.Getpid())
- integration.RunRootMT(env, "--veyron.tcp.address=127.0.0.1:0", "--neighborhood_name="+neighborhood)
+ v23tests.RunRootMT(env, "--veyron.tcp.address=127.0.0.1:0", "--neighborhood_name="+neighborhood)
name, _ := env.GetVar("NAMESPACE_ROOT")
clientBin := env.BuildGoPkg("v.io/core/veyron/tools/mounttable")
// Get the neighborhood endpoint from the mounttable.
- neighborhoodEndpoint := clientBin.Start("glob", name, "nh").Session().ExpectSetEventuallyRE(`^nh (.*) \(TTL .*\)$`)[0][1]
+ neighborhoodEndpoint := clientBin.Start("glob", name, "nh").ExpectSetEventuallyRE(`^nh (.*) \(TTL .*\)$`)[0][1]
if clientBin.Start("mount", name+"/myself", name, "5m").Wait(os.Stdout, os.Stderr) != nil {
t.Fatalf("failed to mount the mounttable on itself")
@@ -45,8 +43,8 @@
// Test glob output. We expect three entries (two we mounted plus the
// neighborhood). The 'myself' entry should be the IP:port we
// specified for the mounttable.
- e := expect.NewSession(t, clientBin.Start("glob", name, "*").Stdout(), 10*time.Second)
- matches := e.ExpectSetEventuallyRE(
+ glob := clientBin.Start("glob", name, "*")
+ matches := glob.ExpectSetEventuallyRE(
`^google /www\.google\.com:80 \(TTL .*\)$`,
`^myself (.*) \(TTL .*\)$`,
`^nh `+regexp.QuoteMeta(neighborhoodEndpoint)+` \(TTL .*\)$`)
@@ -56,8 +54,8 @@
// Test globbing on the neighborhood name. Its endpoint should be the
// endpoint of the mount table.
- e = expect.NewSession(t, clientBin.Start("glob", "/"+neighborhoodEndpoint, neighborhood).Stdout(), 10*time.Second)
- matches = e.ExpectSetEventuallyRE("^" + regexp.QuoteMeta(neighborhood) + ` (.*) \(TTL .*\)$`)
+ glob = clientBin.Start("glob", "/"+neighborhoodEndpoint, neighborhood)
+ matches = glob.ExpectSetEventuallyRE("^" + regexp.QuoteMeta(neighborhood) + ` (.*) \(TTL .*\)$`)
if matches[0][1] != name {
t.Fatalf("expected endpoint of mount table for name %s", neighborhood)
}
diff --git a/tools/debug/testdata/integration_test.go b/tools/debug/testdata/integration_test.go
index 8ecae2a..0a09142 100644
--- a/tools/debug/testdata/integration_test.go
+++ b/tools/debug/testdata/integration_test.go
@@ -11,8 +11,7 @@
"testing"
"time"
- "v.io/core/veyron/lib/testutil/integration"
-
+ "v.io/core/veyron/lib/testutil/v23tests"
_ "v.io/core/veyron/profiles/static"
)
@@ -22,9 +21,9 @@
// TODO(sjr): caching of binaries is limited to a single instance of
// of the integration environment which makes this test very slow.
func TestDebugGlob(t *testing.T) {
- env := integration.New(t)
+ env := v23tests.New(t)
defer env.Cleanup()
- integration.RunRootMT(env, "--veyron.tcp.address=127.0.0.1:0")
+ v23tests.RunRootMT(env, "--veyron.tcp.address=127.0.0.1:0")
binary := env.BuildGoPkg("v.io/core/veyron/tools/debug")
inv := binary.Start("glob", "__debug/*")
@@ -39,9 +38,9 @@
}
func TestDebugGlobLogs(t *testing.T) {
- env := integration.New(t)
+ env := v23tests.New(t)
defer env.Cleanup()
- integration.RunRootMT(env, "--veyron.tcp.address=127.0.0.1:0")
+ v23tests.RunRootMT(env, "--veyron.tcp.address=127.0.0.1:0")
fileName := filepath.Base(env.TempFile().Name())
binary := env.BuildGoPkg("v.io/core/veyron/tools/debug")
@@ -55,9 +54,9 @@
}
func TestReadHostname(t *testing.T) {
- env := integration.New(t)
+ env := v23tests.New(t)
defer env.Cleanup()
- integration.RunRootMT(env, "--veyron.tcp.address=127.0.0.1:0")
+ v23tests.RunRootMT(env, "--veyron.tcp.address=127.0.0.1:0")
path := "__debug/stats/system/hostname"
binary := env.BuildGoPkg("v.io/core/veyron/tools/debug")
@@ -71,7 +70,7 @@
}
}
-func createTestLogFile(t *testing.T, env integration.T, content string) *os.File {
+func createTestLogFile(t *testing.T, env v23tests.T, content string) *os.File {
file := env.TempFile()
_, err := file.Write([]byte(content))
if err != nil {
@@ -81,9 +80,9 @@
}
func TestLogSize(t *testing.T) {
- env := integration.New(t)
+ env := v23tests.New(t)
defer env.Cleanup()
- integration.RunRootMT(env, "--veyron.tcp.address=127.0.0.1:0")
+ v23tests.RunRootMT(env, "--veyron.tcp.address=127.0.0.1:0")
binary := env.BuildGoPkg("v.io/core/veyron/tools/debug")
testLogData := "This is a test log file"
@@ -102,9 +101,9 @@
}
func TestStatsRead(t *testing.T) {
- env := integration.New(t)
+ env := v23tests.New(t)
defer env.Cleanup()
- integration.RunRootMT(env, "--veyron.tcp.address=127.0.0.1:0")
+ v23tests.RunRootMT(env, "--veyron.tcp.address=127.0.0.1:0")
binary := env.BuildGoPkg("v.io/core/veyron/tools/debug")
testLogData := "This is a test log file\n"
@@ -124,9 +123,9 @@
}
func TestStatsWatch(t *testing.T) {
- env := integration.New(t)
+ env := v23tests.New(t)
defer env.Cleanup()
- integration.RunRootMT(env, "--veyron.tcp.address=127.0.0.1:0")
+ v23tests.RunRootMT(env, "--veyron.tcp.address=127.0.0.1:0")
binary := env.BuildGoPkg("v.io/core/veyron/tools/debug")
testLogData := "This is a test log file\n"
@@ -160,14 +159,14 @@
}
}
-func performTracedRead(debugBinary integration.TestBinary, path string) string {
+func performTracedRead(debugBinary v23tests.TestBinary, path string) string {
return debugBinary.Start("--veyron.vtrace.sample_rate=1", "logs", "read", path).Output()
}
func TestVTrace(t *testing.T) {
- env := integration.New(t)
+ env := v23tests.New(t)
defer env.Cleanup()
- integration.RunRootMT(env, "--veyron.tcp.address=127.0.0.1:0")
+ v23tests.RunRootMT(env, "--veyron.tcp.address=127.0.0.1:0")
binary := env.BuildGoPkg("v.io/core/veyron/tools/debug")
logContent := "Hello, world!\n"
@@ -220,9 +219,9 @@
}
func TestPprof(t *testing.T) {
- env := integration.New(t)
+ env := v23tests.New(t)
defer env.Cleanup()
- integration.RunRootMT(env, "--veyron.tcp.address=127.0.0.1:0")
+ v23tests.RunRootMT(env, "--veyron.tcp.address=127.0.0.1:0")
binary := env.BuildGoPkg("v.io/core/veyron/tools/debug")
inv := binary.Start("pprof", "run", "__debug/pprof", "heap", "--text")
diff --git a/tools/naming/simulator/simulator_test.go b/tools/naming/simulator/simulator_test.go
index fae47ca..0e01268 100644
--- a/tools/naming/simulator/simulator_test.go
+++ b/tools/naming/simulator/simulator_test.go
@@ -11,13 +11,14 @@
"testing"
"v.io/core/veyron/lib/modules"
- "v.io/core/veyron/lib/testutil/integration"
+ "v.io/core/veyron/lib/testutil/v23tests"
)
func TestHelperProcess(t *testing.T) {
modules.DispatchInTest()
}
-func V23TestSimulator(t integration.T) {
+
+func V23TestSimulator(t v23tests.T) {
binary := t.BuildGoPkg("v.io/core/veyron/tools/naming/simulator")
files, err := ioutil.ReadDir("./testdata")
if err != nil {
diff --git a/tools/naming/simulator/testdata/integration_test.go b/tools/naming/simulator/testdata/integration_test.go
index 77c5ddb..12c8576 100644
--- a/tools/naming/simulator/testdata/integration_test.go
+++ b/tools/naming/simulator/testdata/integration_test.go
@@ -9,8 +9,7 @@
"testing"
"v.io/core/veyron/lib/modules"
- "v.io/core/veyron/lib/testutil/integration"
-
+ "v.io/core/veyron/lib/testutil/v23tests"
_ "v.io/core/veyron/profiles/static"
)
@@ -19,7 +18,7 @@
}
func TestSimulator(t *testing.T) {
- env := integration.New(t)
+ env := v23tests.New(t)
defer env.Cleanup()
binary := env.BuildGoPkg("v.io/core/veyron/tools/naming/simulator")
files, err := ioutil.ReadDir(".")
diff --git a/tools/naming/simulator/v23_test.go b/tools/naming/simulator/v23_test.go
index dfde460..be63305 100644
--- a/tools/naming/simulator/v23_test.go
+++ b/tools/naming/simulator/v23_test.go
@@ -6,7 +6,7 @@
import "os"
import "v.io/core/veyron/lib/testutil"
-import "v.io/core/veyron/lib/testutil/integration"
+import "v.io/core/veyron/lib/testutil/v23tests"
func TestMain(m *testing.M) {
testutil.Init()
@@ -15,5 +15,5 @@
}
func TestV23Simulator(t *testing.T) {
- integration.RunTest(t, V23TestSimulator)
+ v23tests.RunTest(t, V23TestSimulator)
}
diff --git a/tools/principal/principal_test.go b/tools/principal/principal_test.go
index 302a698..e38b017 100644
--- a/tools/principal/principal_test.go
+++ b/tools/principal/principal_test.go
@@ -8,7 +8,7 @@
"testing"
"v.io/core/veyron/lib/modules"
- "v.io/core/veyron/lib/testutil/integration"
+ "v.io/core/veyron/lib/testutil/v23tests"
)
//go:generate v23 integration generate
@@ -18,13 +18,13 @@
// redirect redirects the stdout of the given invocation to the file at the
// given path.
-func redirect(t integration.T, inv integration.Invocation, path string) {
+func redirect(t v23tests.T, inv v23tests.Invocation, path string) {
if err := ioutil.WriteFile(path, []byte(inv.Output()), 0600); err != nil {
t.Fatalf("WriteFile(%q) failed: %v\n", path, err)
}
}
-func V23TestBlessSelf(t integration.T) {
+func V23TestBlessSelf(t v23tests.T) {
var (
outputDir = t.TempDir()
aliceDir = filepath.Join(outputDir, "alice")
diff --git a/tools/principal/testdata/integration_test.go b/tools/principal/testdata/integration_test.go
index 030dd17..a1d454b 100644
--- a/tools/principal/testdata/integration_test.go
+++ b/tools/principal/testdata/integration_test.go
@@ -8,7 +8,7 @@
"testing"
"v.io/core/veyron/lib/modules"
- "v.io/core/veyron/lib/testutil/integration"
+ "v.io/core/veyron/lib/testutil/v23tests"
_ "v.io/core/veyron/profiles"
)
@@ -18,14 +18,14 @@
// redirect redirects the stdout of the given invocation to the file at the
// given path.
-func redirect(t *testing.T, inv integration.Invocation, path string) {
+func redirect(t *testing.T, inv v23tests.Invocation, path string) {
if err := ioutil.WriteFile(path, []byte(inv.Output()), 0600); err != nil {
t.Fatalf("WriteFile(%q) failed: %v\n", path, err)
}
}
func TestBlessSelf(t *testing.T) {
- env := integration.New(t)
+ env := v23tests.New(t)
defer env.Cleanup()
var (
diff --git a/tools/principal/v23_test.go b/tools/principal/v23_test.go
index f421ae1..4e12189 100644
--- a/tools/principal/v23_test.go
+++ b/tools/principal/v23_test.go
@@ -6,7 +6,7 @@
import "os"
import "v.io/core/veyron/lib/testutil"
-import "v.io/core/veyron/lib/testutil/integration"
+import "v.io/core/veyron/lib/testutil/v23tests"
func TestMain(m *testing.M) {
testutil.Init()
@@ -15,5 +15,5 @@
}
func TestV23BlessSelf(t *testing.T) {
- integration.RunTest(t, V23TestBlessSelf)
+ v23tests.RunTest(t, V23TestBlessSelf)
}