aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2022-04-19 23:30:41 +0700
committerShulhan <ms@kilabit.info>2022-04-19 23:30:41 +0700
commit39afff150f2a94c6910408c36b030b5969b5f02e (patch)
tree165a80d9c3c983dbb0ed6751da5bf2a1fa004454
parented83581fc716d5d41d769662fae0bc5e78309982 (diff)
downloadrescached-39afff150f2a94c6910408c36b030b5969b5f02e.tar.xz
all: move the rescached.cfg for test under _test directory
-rw-r--r--Makefile2
-rw-r--r--_test/etc/rescached/rescached.cfg (renamed from cmd/rescached/rescached.cfg.test)0
-rw-r--r--environment_test.go6
3 files changed, 4 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index f8e3d74..6ecf94a 100644
--- a/Makefile
+++ b/Makefile
@@ -87,7 +87,7 @@ clean:
.PHONY: dev
dev:
- go run ./cmd/rescached -dir-base=./_test -config=cmd/rescached/rescached.cfg.test dev
+ go run ./cmd/rescached -dir-base=./_test -config=etc/rescached/rescached.cfg dev
serve-doc:
ciigo serve _doc
diff --git a/cmd/rescached/rescached.cfg.test b/_test/etc/rescached/rescached.cfg
index c81670a..c81670a 100644
--- a/cmd/rescached/rescached.cfg.test
+++ b/_test/etc/rescached/rescached.cfg
diff --git a/environment_test.go b/environment_test.go
index edade88..e7dddb0 100644
--- a/environment_test.go
+++ b/environment_test.go
@@ -61,7 +61,7 @@ parent = https://kilabit.info/dns-query
func TestLoadEnvironment(t *testing.T) {
var (
- testDirBase = "./"
+ testDirBase = "_test"
expEnv = &Environment{
dirBase: testDirBase,
pathDirBlock: filepath.Join(testDirBase, dirBlock),
@@ -70,7 +70,7 @@ func TestLoadEnvironment(t *testing.T) {
pathDirZone: filepath.Join(testDirBase, dirZone),
pathFileCaches: filepath.Join(testDirBase, dirCaches, fileCaches),
- fileConfig: "cmd/rescached/rescached.cfg.test",
+ fileConfig: filepath.Join(testDirBase, "/etc/rescached/rescached.cfg"),
WUIListen: "127.0.0.1:5381",
HostsBlocks: map[string]*hostsBlock{
@@ -111,7 +111,7 @@ func TestLoadEnvironment(t *testing.T) {
t.Fatal(err)
}
- gotEnv, err = LoadEnvironment(testDirBase, "cmd/rescached/rescached.cfg.test")
+ gotEnv, err = LoadEnvironment(testDirBase, "/etc/rescached/rescached.cfg")
if err != nil {
t.Fatal(err)
}