mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 18:35:51 +02:00
feat: use env to predefine admin user #214
This commit is contained in:
parent
13c4eb04a3
commit
4c74bc8619
10 changed files with 89 additions and 28 deletions
|
@ -52,6 +52,7 @@ func TestSetup(t *testing.T) {
|
|||
_ = os.Setenv("NGINX_UI_LOGROTATE_CMD", "logrotate /custom/logrotate.conf")
|
||||
_ = os.Setenv("NGINX_UI_LOGROTATE_INTERVAL", "60")
|
||||
|
||||
ConfPath = "app.testing.ini"
|
||||
Setup()
|
||||
|
||||
assert.Equal(t, "8080", ServerSettings.HttpPort)
|
||||
|
@ -96,4 +97,5 @@ func TestSetup(t *testing.T) {
|
|||
assert.Equal(t, 60, LogrotateSettings.Interval)
|
||||
|
||||
os.Clearenv()
|
||||
_ = os.Remove("app.testing.ini")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue