From 7cae2ae2a01142120f8d0b96f6dc24ea1c2a4edf Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee Date: Tue, 16 Feb 2016 13:57:49 -0800 Subject: [PATCH] e2e: compare output in Go string literal I manually print out the command outputs when the issue was reproduced, and checked they are matching when compared as Go string literals (UTF-8), but not when compared with regex. Fixes https://github.com/coreos/etcd/issues/4480. --- e2e/etcdctl_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e2e/etcdctl_test.go b/e2e/etcdctl_test.go index a2bf0cd9b..1a0d7cf3b 100644 --- a/e2e/etcdctl_test.go +++ b/e2e/etcdctl_test.go @@ -212,9 +212,9 @@ func etcdctlSet(clus *etcdProcessCluster, key, value string, noSync bool) error func etcdctlMk(clus *etcdProcessCluster, key, value string, first, noSync bool) error { cmdArgs := append(etcdctlPrefixArgs(clus, noSync), "mk", key, value) if first { - return spawnWithExpect(cmdArgs, value) + return spawnWithExpectedString(cmdArgs, value) } - return spawnWithExpect(cmdArgs, "Error: 105: Key already exists") + return spawnWithExpectedString(cmdArgs, "Error: 105: Key already exists") } func etcdctlGet(clus *etcdProcessCluster, key, value string, noSync bool) error {