Browse Source

[2136] added a test dbfile of b10-config for testing stats with the
Mock boss

Stats module asks cfgmgr components of boss config. This test db file
contains test components of boss. Data of components are assumed to be
used only for counting number of multi intances. Here the module of
the multi instances is Auth.

Naoki Kambe 12 years ago
parent
commit
4b27d27515
2 changed files with 3 additions and 2 deletions
  1. 2 2
      src/bin/stats/tests/Makefile.am
  2. 1 0
      src/bin/stats/tests/b10-config_test.db

+ 2 - 2
src/bin/stats/tests/Makefile.am

@@ -1,6 +1,6 @@
 PYCOVERAGE_RUN = @PYCOVERAGE_RUN@
 PYTESTS = b10-stats_test.py b10-stats-httpd_test.py
-EXTRA_DIST = $(PYTESTS) test_utils.py
+EXTRA_DIST = $(PYTESTS) test_utils.py b10-config_test.db
 CLEANFILES = test_utils.pyc
 
 # If necessary (rare cases), explicitly specify paths to dynamic libraries
@@ -23,7 +23,7 @@ endif
 	PYTHONPATH=$(COMMON_PYTHON_PATH):$(abs_top_builddir)/src/bin/stats:$(abs_top_builddir)/src/bin/stats/tests:$(abs_top_builddir)/src/bin/msgq:$(abs_top_builddir)/src/lib/python/isc/config \
 	B10_FROM_SOURCE=$(abs_top_srcdir) \
 	BIND10_MSGQ_SOCKET_FILE=$(abs_top_builddir)/msgq_socket \
-	CONFIG_TESTDATA_PATH=$(abs_top_srcdir)/src/lib/config/tests/testdata \
+	CONFIG_TESTDATA_PATH=$(abs_top_srcdir)/src/bin/stats/tests \
 	B10_LOCKFILE_DIR_FROM_BUILD=$(abs_top_builddir) \
 	$(PYCOVERAGE_RUN) $(abs_srcdir)/$$pytest || exit ; \
 	done

+ 1 - 0
src/bin/stats/tests/b10-config_test.db

@@ -0,0 +1 @@
+{"version": 2, "Boss": {"components": {"b10-auth": {"kind": "needed", "special": "auth"}, "b10-auth-2": {"kind": "needed", "special": "auth"}, "b10-auth-3": {"kind": "needed", "special": "auth"}, "b10-auth-4": {"kind": "needed", "special": "auth"}}}}