mirror of
https://github.com/miniflux/v2.git
synced 2025-08-11 17:51:01 +00:00
Add first integration test
This commit is contained in:
parent
71bf7e4358
commit
142e8b3e0c
14 changed files with 891 additions and 12 deletions
12
main.go
12
main.go
|
@ -116,8 +116,16 @@ func main() {
|
|||
}
|
||||
|
||||
if *flagCreateAdmin {
|
||||
user := &model.User{IsAdmin: true}
|
||||
user.Username, user.Password = askCredentials()
|
||||
user := &model.User{
|
||||
Username: os.Getenv("ADMIN_USERNAME"),
|
||||
Password: os.Getenv("ADMIN_PASSWORD"),
|
||||
IsAdmin: true,
|
||||
}
|
||||
|
||||
if user.Username == "" || user.Password == "" {
|
||||
user.Username, user.Password = askCredentials()
|
||||
}
|
||||
|
||||
if err := user.ValidateUserCreation(); err != nil {
|
||||
fmt.Println(err)
|
||||
os.Exit(1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue