mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 10:17:17 +08:00
fix: tests
This commit is contained in:
1
.github/workflows/test.yml
vendored
1
.github/workflows/test.yml
vendored
@@ -19,6 +19,5 @@ jobs:
|
||||
cp panel-example.conf .env
|
||||
echo "DB_FILE=$(pwd)/storage/panel.db" >> .env
|
||||
go run . artisan key:generate
|
||||
go run . artisan migrate
|
||||
- name: Run tests
|
||||
run: go test ./...
|
||||
|
||||
@@ -40,7 +40,6 @@ unit_test:
|
||||
- cp panel-example.conf .env
|
||||
- echo "DB_FILE=$(pwd)/storage/panel.db" >> .env
|
||||
- go run . artisan key:generate
|
||||
- go run . artisan migrate
|
||||
- go test -v -coverprofile=coverage.txt -covermode=atomic ./...
|
||||
|
||||
build:
|
||||
|
||||
@@ -476,10 +476,6 @@ func UpdatePanel(panelInfo PanelInfo) error {
|
||||
_, _ = Exec("chmod -R 700 /usr/bin/panel")
|
||||
color.Green().Printfln("设置完成")
|
||||
|
||||
if _, err = Exec("/www/panel/panel --env=panel.conf artisan migrate"); err != nil {
|
||||
color.Red().Printfln("运行面板数据库迁移失败")
|
||||
return err
|
||||
}
|
||||
if _, err = Exec("bash /www/panel/scripts/update_panel.sh"); err != nil {
|
||||
color.Red().Printfln("执行面板升级后脚本失败")
|
||||
return err
|
||||
|
||||
@@ -269,7 +269,6 @@ Init_Panel() {
|
||||
sed -i "s!APP_ENTRANCE=.*!APP_ENTRANCE=/${entrance}!g" panel.conf
|
||||
${setup_Path}/panel/panel --env="panel.conf" artisan key:generate
|
||||
${setup_Path}/panel/panel --env="panel.conf" artisan jwt:secret
|
||||
${setup_Path}/panel/panel --env="panel.conf" artisan migrate
|
||||
openssl req -x509 -nodes -days 36500 -newkey ec:<(openssl ecparam -name secp384r1) -keyout ${setup_Path}/panel/storage/ssl.key -out ${setup_Path}/panel/storage/ssl.crt -subj "/C=CN/ST=Tianjin/L=Tianjin/O=HaoZi Technology Co., Ltd./OU=HaoZi Panel/CN=Panel"
|
||||
chmod -R 700 ${setup_Path}/panel
|
||||
cp -f scripts/panel.sh /usr/bin/panel
|
||||
|
||||
Reference in New Issue
Block a user