mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 06:47:20 +08:00
feat: 初步实现nginx配置解析器
This commit is contained in:
26
pkg/nginx/parser_test.go
Normal file
26
pkg/nginx/parser_test.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package nginx
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
type NginxTestSuite struct {
|
||||
parser *Parser
|
||||
suite.Suite
|
||||
}
|
||||
|
||||
func TestNginxTestSuite(t *testing.T) {
|
||||
parser, err := NewParser()
|
||||
if err != nil {
|
||||
t.Errorf("parse error %v", err)
|
||||
}
|
||||
suite.Run(t, &NginxTestSuite{
|
||||
parser: parser,
|
||||
})
|
||||
}
|
||||
|
||||
func (suite *NginxTestSuite) TestA() {
|
||||
suite.NoError(suite.parser.SetPHP(81))
|
||||
}
|
||||
Reference in New Issue
Block a user