Commit 4b368d9f authored by Vitaly Velikodny's avatar Vitaly Velikodny

Refactoring: keep config package beego independent

parent 48fd9675
...@@ -17,8 +17,6 @@ package config ...@@ -17,8 +17,6 @@ package config
import ( import (
"os" "os"
"testing" "testing"
"github.com/astaxie/beego"
) )
var inicontext = ` var inicontext = `
...@@ -69,7 +67,7 @@ func TestIni(t *testing.T) { ...@@ -69,7 +67,7 @@ func TestIni(t *testing.T) {
t.Error(pi) t.Error(pi)
t.Fatal(err) t.Fatal(err)
} }
if iniconf.String("runmode") != beego.DEV { if iniconf.String("runmode") != "dev" {
t.Fatal("runmode not equal to dev") t.Fatal("runmode not equal to dev")
} }
if v, err := iniconf.Bool("autorender"); err != nil || v != false { if v, err := iniconf.Bool("autorender"); err != nil || v != false {
......
...@@ -17,8 +17,6 @@ package config ...@@ -17,8 +17,6 @@ package config
import ( import (
"os" "os"
"testing" "testing"
"github.com/astaxie/beego"
) )
var jsoncontext = `{ var jsoncontext = `{
...@@ -122,7 +120,7 @@ func TestJson(t *testing.T) { ...@@ -122,7 +120,7 @@ func TestJson(t *testing.T) {
t.Error(pi) t.Error(pi)
t.Fatal(err) t.Fatal(err)
} }
if jsonconf.String("runmode") != beego.DEV { if jsonconf.String("runmode") != "dev" {
t.Fatal("runmode not equal to dev") t.Fatal("runmode not equal to dev")
} }
if v := jsonconf.Strings("unknown"); len(v) > 0 { if v := jsonconf.Strings("unknown"); len(v) > 0 {
......
...@@ -18,7 +18,6 @@ import ( ...@@ -18,7 +18,6 @@ import (
"os" "os"
"testing" "testing"
"github.com/astaxie/beego"
"github.com/astaxie/beego/config" "github.com/astaxie/beego/config"
) )
...@@ -66,7 +65,7 @@ func TestXML(t *testing.T) { ...@@ -66,7 +65,7 @@ func TestXML(t *testing.T) {
t.Error(pi) t.Error(pi)
t.Fatal(err) t.Fatal(err)
} }
if xmlconf.String("runmode") != beego.DEV { if xmlconf.String("runmode") != "dev" {
t.Fatal("runmode not equal to dev") t.Fatal("runmode not equal to dev")
} }
if v, err := xmlconf.Bool("autorender"); err != nil || v != false { if v, err := xmlconf.Bool("autorender"); err != nil || v != false {
......
...@@ -18,7 +18,6 @@ import ( ...@@ -18,7 +18,6 @@ import (
"os" "os"
"testing" "testing"
"github.com/astaxie/beego"
"github.com/astaxie/beego/config" "github.com/astaxie/beego/config"
) )
...@@ -63,7 +62,7 @@ func TestYaml(t *testing.T) { ...@@ -63,7 +62,7 @@ func TestYaml(t *testing.T) {
t.Error(pi) t.Error(pi)
t.Fatal(err) t.Fatal(err)
} }
if yamlconf.String("runmode") != beego.DEV { if yamlconf.String("runmode") != "dev" {
t.Fatal("runmode not equal to dev") t.Fatal("runmode not equal to dev")
} }
if v, err := yamlconf.Bool("autorender"); err != nil || v != false { if v, err := yamlconf.Bool("autorender"); err != nil || v != false {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment