Skip to content

Commit ba6049b

Browse files
mboersmaarschles
authored andcommitted
fix(_tests): update admin check and token regen cases
1 parent ca185d3 commit ba6049b

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

_tests/auth_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ var _ = Describe("Auth", func() {
5656
It("regenerates the token for a specified user", func() {
5757
output, err := execute("deis auth:regenerate -u %s", testUser)
5858
Expect(err).NotTo(HaveOccurred())
59-
Expect(output).To(ContainSubstring("???"))
59+
Expect(output).To(ContainSubstring("Token Regenerated"))
6060
})
6161

6262
It("regenerates the token for all users", func() {
6363
output, err := execute("deis auth:regenerate --all")
6464
Expect(err).NotTo(HaveOccurred())
65-
Expect(output).To(ContainSubstring("???"))
65+
Expect(output).To(ContainSubstring("Token Regenerated"))
6666
})
6767
})
6868
})

_tests/tests_suite_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ var _ = BeforeSuite(func() {
4747

4848
// register the test-admin user
4949
register(url, testAdminUser, testAdminPassword, testAdminEmail)
50-
// TODO: verify that this user is actually an admin
50+
// verify this user is an admin by running a privileged command
51+
_, err = execute("deis users:list")
52+
Expect(err).NotTo(HaveOccurred())
5153

5254
// register the test user and add a key
5355
register(url, testUser, testPassword, testEmail)

0 commit comments

Comments
 (0)