Skip to content

Commit 04f7b83

Browse files
committed
BUG/MINOR: userlists: fix error handling for users and groups
1 parent af0b4f3 commit 04f7b83

File tree

9 files changed

+153
-56
lines changed

9 files changed

+153
-56
lines changed

e2e/tests/groups/add.bats

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ load 'utils/_helpers'
3030

3131
@test "groups: Add a group to a non existing user list" {
3232
resource_post "$_GROUPS_BASE_PATH" "data/post.json" "userlist=fake&=force_reload=true"
33-
assert_equal "$SC" 400
33+
assert_equal "$SC" 404
3434
}
3535

3636
@test "groups: Add a malformed group" {

e2e/tests/groups/data/post.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"index": 0,
32
"name": "new",
43
"users": null
54
}

e2e/tests/groups/data/replace.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"index": 0,
3-
"name": "enigma",
2+
"name": "zion",
43
"users": "trinity"
54
}

e2e/tests/groups/replace.bats

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,3 @@ load 'utils/_helpers'
4242
resource_put "$_GROUPS_BASE_PATH/1000" "data/replace.json" "userlist=fake&force_reload=true"
4343
assert_equal "$SC" 404
4444
}
45-

e2e/tests/users/data/post.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"index": 0,
32
"username": "new",
43
"secure_password": false,
54
"password": "new",

e2e/tests/users/data/replace.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
2-
"index": 0,
3-
"username": "enigma",
2+
"username": "trinity",
43
"secure_password": false,
54
"password": "reality",
65
"groups": null

embedded_spec.go

Lines changed: 144 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ require (
2222
github.com/go-openapi/validate v0.22.0
2323
github.com/google/renameio v1.0.1
2424
github.com/google/uuid v1.3.0
25-
github.com/haproxytech/client-native/v4 v4.0.1-0.20221101161502-b41c6b9880f1
26-
github.com/haproxytech/config-parser/v4 v4.0.1-0.20221101155822-bb83e776d3c8
25+
github.com/haproxytech/client-native/v4 v4.0.1-0.20221128142255-7eceed461c56
26+
github.com/haproxytech/config-parser/v4 v4.0.1-0.20221116162214-027124b8418d
2727
github.com/hashicorp/consul/api v1.17.0
2828
github.com/hashicorp/hcl v1.0.0
2929
github.com/jessevdk/go-flags v1.5.0

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,10 @@ github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+
165165
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
166166
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
167167
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
168-
github.com/haproxytech/client-native/v4 v4.0.1-0.20221101161502-b41c6b9880f1 h1:CmmlRWfT0JUHd5T/78IE+rNfaGr/Scp7kd8+Y/QZI6s=
169-
github.com/haproxytech/client-native/v4 v4.0.1-0.20221101161502-b41c6b9880f1/go.mod h1:JXPKBpmb/UmPUk2rx4Cq7OBIDgNP+Ngtdnc+2e0AYFo=
170-
github.com/haproxytech/config-parser/v4 v4.0.1-0.20221101155822-bb83e776d3c8 h1:1MbeJkpbbTmyDtSiJH13XKZkG2pYrSJJ6l5/dQcgWHU=
171-
github.com/haproxytech/config-parser/v4 v4.0.1-0.20221101155822-bb83e776d3c8/go.mod h1:reXxQMovpfJxmc3WLu6UkL29F9hx/PSKHS2jl47M3gs=
168+
github.com/haproxytech/client-native/v4 v4.0.1-0.20221128142255-7eceed461c56 h1:oUGGubRnhtAMD2bceXHU1JEwDH5QHpC7UzJKpQxxzuA=
169+
github.com/haproxytech/client-native/v4 v4.0.1-0.20221128142255-7eceed461c56/go.mod h1:ySJkKFKu/OFxdF5gF2CNWo0qbY15drBSlh8oGE4+rd4=
170+
github.com/haproxytech/config-parser/v4 v4.0.1-0.20221116162214-027124b8418d h1:lQohzyz+hvpkbDFGYIeR9Ghkn551IuTOnCtZRywHCEA=
171+
github.com/haproxytech/config-parser/v4 v4.0.1-0.20221116162214-027124b8418d/go.mod h1:reXxQMovpfJxmc3WLu6UkL29F9hx/PSKHS2jl47M3gs=
172172
github.com/haproxytech/go-logger v1.1.0 h1:HgGtYaI1ApkvbQdsm7f9AzQQoxTB7w37criTflh7IQE=
173173
github.com/haproxytech/go-logger v1.1.0/go.mod h1:OekUd8HCb7ubxMplzHUPBTHNxZmddOWfOjWclZsqIeM=
174174
github.com/hashicorp/consul/api v1.17.0 h1:aqytbw31uCPNn37ST+717IyGod+P1eTgSGu3yjRo4bs=

0 commit comments

Comments
 (0)