storage/kubernetes: fix conflict error detection in TRP creation

PR #815 fixed the Kubernetes storage implementation by correctly
returning storage.ErrAlreadyExists on POST conflicts. This caused a
regression in TPR creation (#822) when some, but not all, of the
resources already existed. E.g. for users upgrading from old
versions of dex.

Fixes #822
This commit is contained in:
Eric Chiang
2017-02-27 09:34:59 -08:00
parent 1da2ae279c
commit a7b8e52b92
2 changed files with 33 additions and 22 deletions

View File

@@ -28,7 +28,7 @@ func loadClient(t *testing.T) *client {
Formatter: &logrus.TextFormatter{DisableColors: true},
Level: logrus.DebugLevel,
}
s, err := config.open(logger)
s, err := config.open(logger, true)
if err != nil {
t.Fatal(err)
}