mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-08 09:15:29 -04:00
AB#2222 replace unlicensed passwd package with own implementation
This commit is contained in:
parent
f57a7e3ed0
commit
48d614c959
8 changed files with 75 additions and 32 deletions
|
@ -22,12 +22,35 @@ func TestParse(t *testing.T) {
|
|||
createFile: true,
|
||||
wantEntries: Entries{
|
||||
"root": {
|
||||
Pass: "x",
|
||||
Uid: "0",
|
||||
Gid: "0",
|
||||
Gecos: "root",
|
||||
Home: "/root",
|
||||
Shell: "/bin/bash",
|
||||
Password: "x",
|
||||
UID: "0",
|
||||
GID: "0",
|
||||
GECOS: "root",
|
||||
Directory: "/root",
|
||||
Shell: "/bin/bash",
|
||||
},
|
||||
},
|
||||
wantErr: false,
|
||||
},
|
||||
"multiple lines": {
|
||||
passwdContents: "root:x:0:0:root:/root:/bin/bash\nfoo:y:1:2:bar:baz:sh",
|
||||
createFile: true,
|
||||
wantEntries: Entries{
|
||||
"root": {
|
||||
Password: "x",
|
||||
UID: "0",
|
||||
GID: "0",
|
||||
GECOS: "root",
|
||||
Directory: "/root",
|
||||
Shell: "/bin/bash",
|
||||
},
|
||||
"foo": {
|
||||
Password: "y",
|
||||
UID: "1",
|
||||
GID: "2",
|
||||
GECOS: "bar",
|
||||
Directory: "baz",
|
||||
Shell: "sh",
|
||||
},
|
||||
},
|
||||
wantErr: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue