From de5b7f8f24719c1a59667f1c8a78b322dfdb4a3d Mon Sep 17 00:00:00 2001 From: Jeremy Stribling Date: Fri, 10 Apr 2020 13:34:12 -0700 Subject: [PATCH] test: add a conflict resolution test with obfuscated logs Issue: HOTPOT-2418 --- go/kbfs/test/cr_basic_conflicts_test.go | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/go/kbfs/test/cr_basic_conflicts_test.go b/go/kbfs/test/cr_basic_conflicts_test.go index 92a6cc179dde..bd39e04c78f0 100644 --- a/go/kbfs/test/cr_basic_conflicts_test.go +++ b/go/kbfs/test/cr_basic_conflicts_test.go @@ -7,12 +7,15 @@ package test import ( + "os" "testing" "time" + + "github.com/keybase/client/go/kbfs/libkbfs" ) // bob and alice both write(to the same file), -func TestCrConflictWriteFile(t *testing.T) { +func testCrConflictWriteFile(t *testing.T) { test(t, users("alice", "bob"), as(alice, @@ -39,6 +42,19 @@ func TestCrConflictWriteFile(t *testing.T) { ) } +func TestCrConflictWriteFile(t *testing.T) { + testCrConflictWriteFile(t) +} + +func TestCrConflictWriteFileWithObfuscation(t *testing.T) { + oldEnv := os.Getenv(libkbfs.EnvKeybaseTestObfuscateLogsForTest) + os.Setenv(libkbfs.EnvKeybaseTestObfuscateLogsForTest, "1") + defer func() { + os.Setenv(libkbfs.EnvKeybaseTestObfuscateLogsForTest, oldEnv) + }() + testCrConflictWriteFile(t) +} + // bob and alice both create the same entry with different types func TestCrConflictCreateWithDifferentTypes(t *testing.T) { test(t,