1
0
Fork 0
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:
Frédéric Guillot 2017-11-25 10:40:23 -08:00
parent 71bf7e4358
commit 142e8b3e0c
14 changed files with 891 additions and 12 deletions

12
main.go
View file

@ -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)