config_test.go 816 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. package config
  2. import (
  3. "testing"
  4. )
  5. func TestInit(t *testing.T) {
  6. tests := []struct {
  7. name string
  8. }{
  9. // TODO: Add test cases.
  10. {name: "t"},
  11. {name: "t1"},
  12. }
  13. for _, tt := range tests {
  14. t.Run(tt.name, func(t *testing.T) {
  15. Default()
  16. t.Log(tt)
  17. Store()
  18. })
  19. }
  20. }
  21. func TestSetConfigInfo(t *testing.T) {
  22. type args struct {
  23. name string
  24. config string
  25. path string
  26. }
  27. tests := []struct {
  28. name string
  29. args args
  30. }{
  31. // TODO: Add test cases.
  32. {name: "t", args: args{
  33. name: "test1",
  34. config: "ini",
  35. path: ".",
  36. }},
  37. {name: "t1", args: args{
  38. name: "test2",
  39. config: "yaml",
  40. path: "./test/",
  41. }},
  42. }
  43. for _, tt := range tests {
  44. t.Run(tt.name, func(t *testing.T) {
  45. t.Log(tt)
  46. SetConfigInfo(tt.args.name, tt.args.config, tt.args.path)
  47. Store()
  48. })
  49. }
  50. }