Skip to content

Commit 949d410

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

51 files changed

Lines changed: 1061 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: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
users:
2+
- name: user1@example.com
3+
uid: 1111
4+
gid: 11111
5+
gecos: |-
6+
User1 gecos
7+
On multiple lines
8+
dir: /tmp/authd-delete-cmd-test/home/user1@example.com
9+
shell: /bin/bash
10+
broker_id: broker-id
11+
- name: user2@example.com
12+
uid: 2222
13+
gid: 22222
14+
gecos: User2
15+
dir: /tmp/authd-delete-cmd-test/home/user2@example.com
16+
shell: /bin/dash
17+
broker_id: broker-id
18+
groups:
19+
- name: group1
20+
gid: 11111
21+
ugid: "12345678"
22+
- name: group2
23+
gid: 22222
24+
ugid: "23456781"
25+
- name: group3-nonprimary
26+
gid: 33333
27+
ugid: "34567812"
28+
- name: group4-nonprimary
29+
gid: 44444
30+
ugid: "45678123"
31+
- name: group5-nonprimary
32+
gid: 55555
33+
ugid: "56781234"
34+
- name: group6-nonprimary
35+
gid: 66666
36+
ugid: "67812345"
37+
users_to_groups:
38+
- uid: 1111
39+
gid: 11111
40+
- uid: 2222
41+
gid: 22222
42+
- uid: 1111
43+
gid: 33333

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 "group6-nonprimary"? [y/N] Group "group6-nonprimary" 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 "group4-nonprimary"? [y/N] Group "group4-nonprimary" 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 "group5-nonprimary"? [y/N] Group "group5-nonprimary" has been deleted from the authd database.

0 commit comments

Comments
 (0)