Skip to content

Commit b6bf173

Browse files
committed
Add test data/golden files for user deletion tests
Signed-off-by: Shiv Tyagi <shivtyagi3015@gmail.com>
1 parent c7faf08 commit b6bf173

46 files changed

Lines changed: 951 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
users:
2+
- name: user1
3+
uid: 1111
4+
gid: 11111
5+
gecos: |-
6+
User1 gecos
7+
On multiple lines
8+
dir: /home/user1
9+
shell: /bin/bash
10+
broker_id: broker-id
11+
- name: user2
12+
uid: 2222
13+
gid: 22222
14+
gecos: User2
15+
dir: /home/user2
16+
shell: /bin/dash
17+
broker_id: broker-id
18+
- name: user3
19+
uid: 3333
20+
gid: 33333
21+
gecos: User3
22+
dir: /home/user3
23+
shell: /bin/zsh
24+
broker_id: broker-id
25+
- name: user4
26+
uid: 4444
27+
gid: 44444
28+
gecos: User4
29+
dir: /home/user4
30+
shell: /bin/sh
31+
broker_id: broker-id
32+
groups:
33+
- name: group1
34+
gid: 11111
35+
ugid: "12345678"
36+
- name: group2
37+
gid: 22222
38+
ugid: "23456781"
39+
- name: group3
40+
gid: 33333
41+
ugid: "34567812"
42+
- name: group4
43+
gid: 44444
44+
ugid: "45678123"
45+
users_to_groups:
46+
- uid: 1111
47+
gid: 11111
48+
- uid: 2222
49+
gid: 22222
50+
- uid: 3333
51+
gid: 33333
52+
- uid: 4444
53+
gid: 44444

cmd/authctl/group/testdata/golden/TestGroupCommand/Error_on_invalid_command

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Usage:
44

55
Available Commands:
66
set-gid Set the GID of a group managed by authd
7+
delete Delete a group managed by authd
78

89
Flags:
910
-h, --help help for group

cmd/authctl/group/testdata/golden/TestGroupCommand/Error_on_invalid_flag

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Usage:
44

55
Available Commands:
66
set-gid Set the GID of a group managed by authd
7+
delete Delete a group managed by authd
78

89
Flags:
910
-h, --help help for group

cmd/authctl/group/testdata/golden/TestGroupCommand/Help_flag

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Usage:
66

77
Available Commands:
88
set-gid Set the GID of a group managed by authd
9+
delete Delete a group managed by authd
910

1011
Flags:
1112
-h, --help help for group

cmd/authctl/group/testdata/golden/TestGroupCommand/Usage_message_when_no_args

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Usage:
44

55
Available Commands:
66
set-gid Set the GID of a group managed by authd
7+
delete Delete a group managed by authd
78

89
Flags:
910
-h, --help help for group
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
WARNING: Deleting a group that still owns files on the filesystem can lead to
3+
security issues. Any existing files owned by this group's GID may become
4+
accessible to a different group that is later assigned the same GID.
5+
6+
Are you sure you want to delete group "group1"? [y/N] Aborted.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
WARNING: Deleting a group that still owns files on the filesystem can lead to
3+
security issues. Any existing files owned by this group's GID may become
4+
accessible to a different group that is later assigned the same GID.
5+
6+
Are you sure you want to delete group "group1"? [y/N] Aborted.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
WARNING: Deleting a group that still owns files on the filesystem can lead to
3+
security issues. Any existing files owned by this group's GID may become
4+
accessible to a different group that is later assigned the same GID.
5+
6+
Are you sure you want to delete group "group4"? [y/N] Group "group4" has been deleted from the authd database.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
WARNING: Deleting a group that still owns files on the filesystem can lead to
3+
security issues. Any existing files owned by this group's GID may become
4+
accessible to a different group that is later assigned the same GID.
5+
6+
Are you sure you want to delete group "group2"? [y/N] Group "group2" has been deleted from the authd database.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
WARNING: Deleting a group that still owns files on the filesystem can lead to
3+
security issues. Any existing files owned by this group's GID may become
4+
accessible to a different group that is later assigned the same GID.
5+
6+
Are you sure you want to delete group "group3"? [y/N] Group "group3" has been deleted from the authd database.

0 commit comments

Comments
 (0)