docker_cli_volume_test.go 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443
  1. package main
  2. import (
  3. "fmt"
  4. "io/ioutil"
  5. "os"
  6. "os/exec"
  7. "path/filepath"
  8. "strings"
  9. "github.com/docker/docker/pkg/integration/checker"
  10. icmd "github.com/docker/docker/pkg/integration/cmd"
  11. "github.com/go-check/check"
  12. )
  13. func (s *DockerSuite) TestVolumeCLICreate(c *check.C) {
  14. dockerCmd(c, "volume", "create")
  15. _, err := runCommand(exec.Command(dockerBinary, "volume", "create", "-d", "nosuchdriver"))
  16. c.Assert(err, check.Not(check.IsNil))
  17. // test using hidden --name option
  18. out, _ := dockerCmd(c, "volume", "create", "--name=test")
  19. name := strings.TrimSpace(out)
  20. c.Assert(name, check.Equals, "test")
  21. out, _ = dockerCmd(c, "volume", "create", "test2")
  22. name = strings.TrimSpace(out)
  23. c.Assert(name, check.Equals, "test2")
  24. }
  25. func (s *DockerSuite) TestVolumeCLICreateOptionConflict(c *check.C) {
  26. dockerCmd(c, "volume", "create", "test")
  27. out, _, err := dockerCmdWithError("volume", "create", "test", "--driver", "nosuchdriver")
  28. c.Assert(err, check.NotNil, check.Commentf("volume create exception name already in use with another driver"))
  29. c.Assert(out, checker.Contains, "A volume named test already exists")
  30. out, _ = dockerCmd(c, "volume", "inspect", "--format={{ .Driver }}", "test")
  31. _, _, err = dockerCmdWithError("volume", "create", "test", "--driver", strings.TrimSpace(out))
  32. c.Assert(err, check.IsNil)
  33. // make sure hidden --name option conflicts with positional arg name
  34. out, _, err = dockerCmdWithError("volume", "create", "--name", "test2", "test2")
  35. c.Assert(err, check.NotNil, check.Commentf("Conflicting options: either specify --name or provide positional arg, not both"))
  36. }
  37. func (s *DockerSuite) TestVolumeCLIInspect(c *check.C) {
  38. c.Assert(
  39. exec.Command(dockerBinary, "volume", "inspect", "doesntexist").Run(),
  40. check.Not(check.IsNil),
  41. check.Commentf("volume inspect should error on non-existent volume"),
  42. )
  43. out, _ := dockerCmd(c, "volume", "create")
  44. name := strings.TrimSpace(out)
  45. out, _ = dockerCmd(c, "volume", "inspect", "--format={{ .Name }}", name)
  46. c.Assert(strings.TrimSpace(out), check.Equals, name)
  47. dockerCmd(c, "volume", "create", "test")
  48. out, _ = dockerCmd(c, "volume", "inspect", "--format={{ .Name }}", "test")
  49. c.Assert(strings.TrimSpace(out), check.Equals, "test")
  50. }
  51. func (s *DockerSuite) TestVolumeCLIInspectMulti(c *check.C) {
  52. dockerCmd(c, "volume", "create", "test1")
  53. dockerCmd(c, "volume", "create", "test2")
  54. dockerCmd(c, "volume", "create", "not-shown")
  55. result := dockerCmdWithResult("volume", "inspect", "--format={{ .Name }}", "test1", "test2", "doesntexist", "not-shown")
  56. c.Assert(result, icmd.Matches, icmd.Expected{
  57. ExitCode: 1,
  58. Err: "No such volume: doesntexist",
  59. })
  60. out := result.Stdout()
  61. outArr := strings.Split(strings.TrimSpace(out), "\n")
  62. c.Assert(len(outArr), check.Equals, 2, check.Commentf("\n%s", out))
  63. c.Assert(out, checker.Contains, "test1")
  64. c.Assert(out, checker.Contains, "test2")
  65. c.Assert(out, checker.Not(checker.Contains), "not-shown")
  66. }
  67. func (s *DockerSuite) TestVolumeCLILs(c *check.C) {
  68. prefix, _ := getPrefixAndSlashFromDaemonPlatform()
  69. dockerCmd(c, "volume", "create", "aaa")
  70. dockerCmd(c, "volume", "create", "test")
  71. dockerCmd(c, "volume", "create", "soo")
  72. dockerCmd(c, "run", "-v", "soo:"+prefix+"/foo", "busybox", "ls", "/")
  73. out, _ := dockerCmd(c, "volume", "ls")
  74. outArr := strings.Split(strings.TrimSpace(out), "\n")
  75. c.Assert(len(outArr), check.Equals, 4, check.Commentf("\n%s", out))
  76. assertVolList(c, out, []string{"aaa", "soo", "test"})
  77. }
  78. func (s *DockerSuite) TestVolumeLsFormat(c *check.C) {
  79. dockerCmd(c, "volume", "create", "aaa")
  80. dockerCmd(c, "volume", "create", "test")
  81. dockerCmd(c, "volume", "create", "soo")
  82. out, _ := dockerCmd(c, "volume", "ls", "--format", "{{.Name}}")
  83. lines := strings.Split(strings.TrimSpace(string(out)), "\n")
  84. expected := []string{"aaa", "soo", "test"}
  85. var names []string
  86. names = append(names, lines...)
  87. c.Assert(expected, checker.DeepEquals, names, check.Commentf("Expected array with truncated names: %v, got: %v", expected, names))
  88. }
  89. func (s *DockerSuite) TestVolumeLsFormatDefaultFormat(c *check.C) {
  90. dockerCmd(c, "volume", "create", "aaa")
  91. dockerCmd(c, "volume", "create", "test")
  92. dockerCmd(c, "volume", "create", "soo")
  93. config := `{
  94. "volumesFormat": "{{ .Name }} default"
  95. }`
  96. d, err := ioutil.TempDir("", "integration-cli-")
  97. c.Assert(err, checker.IsNil)
  98. defer os.RemoveAll(d)
  99. err = ioutil.WriteFile(filepath.Join(d, "config.json"), []byte(config), 0644)
  100. c.Assert(err, checker.IsNil)
  101. out, _ := dockerCmd(c, "--config", d, "volume", "ls")
  102. lines := strings.Split(strings.TrimSpace(string(out)), "\n")
  103. expected := []string{"aaa default", "soo default", "test default"}
  104. var names []string
  105. names = append(names, lines...)
  106. c.Assert(expected, checker.DeepEquals, names, check.Commentf("Expected array with truncated names: %v, got: %v", expected, names))
  107. }
  108. // assertVolList checks volume retrieved with ls command
  109. // equals to expected volume list
  110. // note: out should be `volume ls [option]` result
  111. func assertVolList(c *check.C, out string, expectVols []string) {
  112. lines := strings.Split(out, "\n")
  113. var volList []string
  114. for _, line := range lines[1 : len(lines)-1] {
  115. volFields := strings.Fields(line)
  116. // wrap all volume name in volList
  117. volList = append(volList, volFields[1])
  118. }
  119. // volume ls should contains all expected volumes
  120. c.Assert(volList, checker.DeepEquals, expectVols)
  121. }
  122. func (s *DockerSuite) TestVolumeCLILsFilterDangling(c *check.C) {
  123. prefix, _ := getPrefixAndSlashFromDaemonPlatform()
  124. dockerCmd(c, "volume", "create", "testnotinuse1")
  125. dockerCmd(c, "volume", "create", "testisinuse1")
  126. dockerCmd(c, "volume", "create", "testisinuse2")
  127. // Make sure both "created" (but not started), and started
  128. // containers are included in reference counting
  129. dockerCmd(c, "run", "--name", "volume-test1", "-v", "testisinuse1:"+prefix+"/foo", "busybox", "true")
  130. dockerCmd(c, "create", "--name", "volume-test2", "-v", "testisinuse2:"+prefix+"/foo", "busybox", "true")
  131. out, _ := dockerCmd(c, "volume", "ls")
  132. // No filter, all volumes should show
  133. c.Assert(out, checker.Contains, "testnotinuse1\n", check.Commentf("expected volume 'testnotinuse1' in output"))
  134. c.Assert(out, checker.Contains, "testisinuse1\n", check.Commentf("expected volume 'testisinuse1' in output"))
  135. c.Assert(out, checker.Contains, "testisinuse2\n", check.Commentf("expected volume 'testisinuse2' in output"))
  136. out, _ = dockerCmd(c, "volume", "ls", "--filter", "dangling=false")
  137. // Explicitly disabling dangling
  138. c.Assert(out, check.Not(checker.Contains), "testnotinuse1\n", check.Commentf("expected volume 'testnotinuse1' in output"))
  139. c.Assert(out, checker.Contains, "testisinuse1\n", check.Commentf("expected volume 'testisinuse1' in output"))
  140. c.Assert(out, checker.Contains, "testisinuse2\n", check.Commentf("expected volume 'testisinuse2' in output"))
  141. out, _ = dockerCmd(c, "volume", "ls", "--filter", "dangling=true")
  142. // Filter "dangling" volumes; only "dangling" (unused) volumes should be in the output
  143. c.Assert(out, checker.Contains, "testnotinuse1\n", check.Commentf("expected volume 'testnotinuse1' in output"))
  144. c.Assert(out, check.Not(checker.Contains), "testisinuse1\n", check.Commentf("volume 'testisinuse1' in output, but not expected"))
  145. c.Assert(out, check.Not(checker.Contains), "testisinuse2\n", check.Commentf("volume 'testisinuse2' in output, but not expected"))
  146. out, _ = dockerCmd(c, "volume", "ls", "--filter", "dangling=1")
  147. // Filter "dangling" volumes; only "dangling" (unused) volumes should be in the output, dangling also accept 1
  148. c.Assert(out, checker.Contains, "testnotinuse1\n", check.Commentf("expected volume 'testnotinuse1' in output"))
  149. c.Assert(out, check.Not(checker.Contains), "testisinuse1\n", check.Commentf("volume 'testisinuse1' in output, but not expected"))
  150. c.Assert(out, check.Not(checker.Contains), "testisinuse2\n", check.Commentf("volume 'testisinuse2' in output, but not expected"))
  151. out, _ = dockerCmd(c, "volume", "ls", "--filter", "dangling=0")
  152. // dangling=0 is same as dangling=false case
  153. c.Assert(out, check.Not(checker.Contains), "testnotinuse1\n", check.Commentf("expected volume 'testnotinuse1' in output"))
  154. c.Assert(out, checker.Contains, "testisinuse1\n", check.Commentf("expected volume 'testisinuse1' in output"))
  155. c.Assert(out, checker.Contains, "testisinuse2\n", check.Commentf("expected volume 'testisinuse2' in output"))
  156. out, _ = dockerCmd(c, "volume", "ls", "--filter", "name=testisin")
  157. c.Assert(out, check.Not(checker.Contains), "testnotinuse1\n", check.Commentf("expected volume 'testnotinuse1' in output"))
  158. c.Assert(out, checker.Contains, "testisinuse1\n", check.Commentf("execpeted volume 'testisinuse1' in output"))
  159. c.Assert(out, checker.Contains, "testisinuse2\n", check.Commentf("expected volume 'testisinuse2' in output"))
  160. out, _ = dockerCmd(c, "volume", "ls", "--filter", "driver=invalidDriver")
  161. outArr := strings.Split(strings.TrimSpace(out), "\n")
  162. c.Assert(len(outArr), check.Equals, 1, check.Commentf("%s\n", out))
  163. out, _ = dockerCmd(c, "volume", "ls", "--filter", "driver=local")
  164. outArr = strings.Split(strings.TrimSpace(out), "\n")
  165. c.Assert(len(outArr), check.Equals, 4, check.Commentf("\n%s", out))
  166. out, _ = dockerCmd(c, "volume", "ls", "--filter", "driver=loc")
  167. outArr = strings.Split(strings.TrimSpace(out), "\n")
  168. c.Assert(len(outArr), check.Equals, 4, check.Commentf("\n%s", out))
  169. }
  170. func (s *DockerSuite) TestVolumeCLILsErrorWithInvalidFilterName(c *check.C) {
  171. out, _, err := dockerCmdWithError("volume", "ls", "-f", "FOO=123")
  172. c.Assert(err, checker.NotNil)
  173. c.Assert(out, checker.Contains, "Invalid filter")
  174. }
  175. func (s *DockerSuite) TestVolumeCLILsWithIncorrectFilterValue(c *check.C) {
  176. out, _, err := dockerCmdWithError("volume", "ls", "-f", "dangling=invalid")
  177. c.Assert(err, check.NotNil)
  178. c.Assert(out, checker.Contains, "Invalid filter")
  179. }
  180. func (s *DockerSuite) TestVolumeCLIRm(c *check.C) {
  181. prefix, _ := getPrefixAndSlashFromDaemonPlatform()
  182. out, _ := dockerCmd(c, "volume", "create")
  183. id := strings.TrimSpace(out)
  184. dockerCmd(c, "volume", "create", "test")
  185. dockerCmd(c, "volume", "rm", id)
  186. dockerCmd(c, "volume", "rm", "test")
  187. out, _ = dockerCmd(c, "volume", "ls")
  188. outArr := strings.Split(strings.TrimSpace(out), "\n")
  189. c.Assert(len(outArr), check.Equals, 1, check.Commentf("%s\n", out))
  190. volumeID := "testing"
  191. dockerCmd(c, "run", "-v", volumeID+":"+prefix+"/foo", "--name=test", "busybox", "sh", "-c", "echo hello > /foo/bar")
  192. out, _, err := runCommandWithOutput(exec.Command(dockerBinary, "volume", "rm", "testing"))
  193. c.Assert(
  194. err,
  195. check.Not(check.IsNil),
  196. check.Commentf("Should not be able to remove volume that is in use by a container\n%s", out))
  197. out, _ = dockerCmd(c, "run", "--volumes-from=test", "--name=test2", "busybox", "sh", "-c", "cat /foo/bar")
  198. c.Assert(strings.TrimSpace(out), check.Equals, "hello")
  199. dockerCmd(c, "rm", "-fv", "test2")
  200. dockerCmd(c, "volume", "inspect", volumeID)
  201. dockerCmd(c, "rm", "-f", "test")
  202. out, _ = dockerCmd(c, "run", "--name=test2", "-v", volumeID+":"+prefix+"/foo", "busybox", "sh", "-c", "cat /foo/bar")
  203. c.Assert(strings.TrimSpace(out), check.Equals, "hello", check.Commentf("volume data was removed"))
  204. dockerCmd(c, "rm", "test2")
  205. dockerCmd(c, "volume", "rm", volumeID)
  206. c.Assert(
  207. exec.Command("volume", "rm", "doesntexist").Run(),
  208. check.Not(check.IsNil),
  209. check.Commentf("volume rm should fail with non-existent volume"),
  210. )
  211. }
  212. func (s *DockerSuite) TestVolumeCLINoArgs(c *check.C) {
  213. out, _ := dockerCmd(c, "volume")
  214. // no args should produce the cmd usage output
  215. usage := "Usage: docker volume COMMAND"
  216. c.Assert(out, checker.Contains, usage)
  217. // invalid arg should error and show the command usage on stderr
  218. _, stderr, _, err := runCommandWithStdoutStderr(exec.Command(dockerBinary, "volume", "somearg"))
  219. c.Assert(err, check.NotNil, check.Commentf(stderr))
  220. c.Assert(stderr, checker.Contains, usage)
  221. // invalid flag should error and show the flag error and cmd usage
  222. _, stderr, _, err = runCommandWithStdoutStderr(exec.Command(dockerBinary, "volume", "--no-such-flag"))
  223. c.Assert(err, check.NotNil, check.Commentf(stderr))
  224. c.Assert(stderr, checker.Contains, usage)
  225. c.Assert(stderr, checker.Contains, "unknown flag: --no-such-flag")
  226. }
  227. func (s *DockerSuite) TestVolumeCLIInspectTmplError(c *check.C) {
  228. out, _ := dockerCmd(c, "volume", "create")
  229. name := strings.TrimSpace(out)
  230. out, exitCode, err := dockerCmdWithError("volume", "inspect", "--format='{{ .FooBar }}'", name)
  231. c.Assert(err, checker.NotNil, check.Commentf("Output: %s", out))
  232. c.Assert(exitCode, checker.Equals, 1, check.Commentf("Output: %s", out))
  233. c.Assert(out, checker.Contains, "Template parsing error")
  234. }
  235. func (s *DockerSuite) TestVolumeCLICreateWithOpts(c *check.C) {
  236. testRequires(c, DaemonIsLinux)
  237. dockerCmd(c, "volume", "create", "-d", "local", "test", "--opt=type=tmpfs", "--opt=device=tmpfs", "--opt=o=size=1m,uid=1000")
  238. out, _ := dockerCmd(c, "run", "-v", "test:/foo", "busybox", "mount")
  239. mounts := strings.Split(out, "\n")
  240. var found bool
  241. for _, m := range mounts {
  242. if strings.Contains(m, "/foo") {
  243. found = true
  244. info := strings.Fields(m)
  245. // tmpfs on <path> type tmpfs (rw,relatime,size=1024k,uid=1000)
  246. c.Assert(info[0], checker.Equals, "tmpfs")
  247. c.Assert(info[2], checker.Equals, "/foo")
  248. c.Assert(info[4], checker.Equals, "tmpfs")
  249. c.Assert(info[5], checker.Contains, "uid=1000")
  250. c.Assert(info[5], checker.Contains, "size=1024k")
  251. break
  252. }
  253. }
  254. c.Assert(found, checker.Equals, true)
  255. }
  256. func (s *DockerSuite) TestVolumeCLICreateLabel(c *check.C) {
  257. testVol := "testvolcreatelabel"
  258. testLabel := "foo"
  259. testValue := "bar"
  260. out, _, err := dockerCmdWithError("volume", "create", "--label", testLabel+"="+testValue, testVol)
  261. c.Assert(err, check.IsNil)
  262. out, _ = dockerCmd(c, "volume", "inspect", "--format={{ .Labels."+testLabel+" }}", testVol)
  263. c.Assert(strings.TrimSpace(out), check.Equals, testValue)
  264. }
  265. func (s *DockerSuite) TestVolumeCLICreateLabelMultiple(c *check.C) {
  266. testVol := "testvolcreatelabel"
  267. testLabels := map[string]string{
  268. "foo": "bar",
  269. "baz": "foo",
  270. }
  271. args := []string{
  272. "volume",
  273. "create",
  274. testVol,
  275. }
  276. for k, v := range testLabels {
  277. args = append(args, "--label", k+"="+v)
  278. }
  279. out, _, err := dockerCmdWithError(args...)
  280. c.Assert(err, check.IsNil)
  281. for k, v := range testLabels {
  282. out, _ = dockerCmd(c, "volume", "inspect", "--format={{ .Labels."+k+" }}", testVol)
  283. c.Assert(strings.TrimSpace(out), check.Equals, v)
  284. }
  285. }
  286. func (s *DockerSuite) TestVolumeCLILsFilterLabels(c *check.C) {
  287. testVol1 := "testvolcreatelabel-1"
  288. out, _, err := dockerCmdWithError("volume", "create", "--label", "foo=bar1", testVol1)
  289. c.Assert(err, check.IsNil)
  290. testVol2 := "testvolcreatelabel-2"
  291. out, _, err = dockerCmdWithError("volume", "create", "--label", "foo=bar2", testVol2)
  292. c.Assert(err, check.IsNil)
  293. out, _ = dockerCmd(c, "volume", "ls", "--filter", "label=foo")
  294. // filter with label=key
  295. c.Assert(out, checker.Contains, "testvolcreatelabel-1\n", check.Commentf("expected volume 'testvolcreatelabel-1' in output"))
  296. c.Assert(out, checker.Contains, "testvolcreatelabel-2\n", check.Commentf("expected volume 'testvolcreatelabel-2' in output"))
  297. out, _ = dockerCmd(c, "volume", "ls", "--filter", "label=foo=bar1")
  298. // filter with label=key=value
  299. c.Assert(out, checker.Contains, "testvolcreatelabel-1\n", check.Commentf("expected volume 'testvolcreatelabel-1' in output"))
  300. c.Assert(out, check.Not(checker.Contains), "testvolcreatelabel-2\n", check.Commentf("expected volume 'testvolcreatelabel-2 in output"))
  301. out, _ = dockerCmd(c, "volume", "ls", "--filter", "label=non-exist")
  302. outArr := strings.Split(strings.TrimSpace(out), "\n")
  303. c.Assert(len(outArr), check.Equals, 1, check.Commentf("\n%s", out))
  304. out, _ = dockerCmd(c, "volume", "ls", "--filter", "label=foo=non-exist")
  305. outArr = strings.Split(strings.TrimSpace(out), "\n")
  306. c.Assert(len(outArr), check.Equals, 1, check.Commentf("\n%s", out))
  307. }
  308. func (s *DockerSuite) TestVolumeCLIRmForceUsage(c *check.C) {
  309. out, _ := dockerCmd(c, "volume", "create")
  310. id := strings.TrimSpace(out)
  311. dockerCmd(c, "volume", "rm", "-f", id)
  312. dockerCmd(c, "volume", "rm", "--force", "nonexist")
  313. out, _ = dockerCmd(c, "volume", "ls")
  314. outArr := strings.Split(strings.TrimSpace(out), "\n")
  315. c.Assert(len(outArr), check.Equals, 1, check.Commentf("%s\n", out))
  316. }
  317. func (s *DockerSuite) TestVolumeCLIRmForce(c *check.C) {
  318. testRequires(c, SameHostDaemon, DaemonIsLinux)
  319. name := "test"
  320. out, _ := dockerCmd(c, "volume", "create", name)
  321. id := strings.TrimSpace(out)
  322. c.Assert(id, checker.Equals, name)
  323. out, _ = dockerCmd(c, "volume", "inspect", "--format", "{{.Mountpoint}}", name)
  324. c.Assert(strings.TrimSpace(out), checker.Not(checker.Equals), "")
  325. // Mountpoint is in the form of "/var/lib/docker/volumes/.../_data", removing `/_data`
  326. path := strings.TrimSuffix(strings.TrimSpace(out), "/_data")
  327. out, _, err := runCommandWithOutput(exec.Command("rm", "-rf", path))
  328. c.Assert(err, check.IsNil)
  329. dockerCmd(c, "volume", "rm", "-f", "test")
  330. out, _ = dockerCmd(c, "volume", "ls")
  331. c.Assert(out, checker.Not(checker.Contains), name)
  332. dockerCmd(c, "volume", "create", "test")
  333. out, _ = dockerCmd(c, "volume", "ls")
  334. c.Assert(out, checker.Contains, name)
  335. }
  336. func (s *DockerSuite) TestVolumeCliInspectWithVolumeOpts(c *check.C) {
  337. testRequires(c, DaemonIsLinux)
  338. // Without options
  339. name := "test1"
  340. dockerCmd(c, "volume", "create", "-d", "local", name)
  341. out, _ := dockerCmd(c, "volume", "inspect", "--format={{ .Options }}", name)
  342. c.Assert(strings.TrimSpace(out), checker.Contains, "map[]")
  343. // With options
  344. name = "test2"
  345. k1, v1 := "type", "tmpfs"
  346. k2, v2 := "device", "tmpfs"
  347. k3, v3 := "o", "size=1m,uid=1000"
  348. dockerCmd(c, "volume", "create", "-d", "local", name, "--opt", fmt.Sprintf("%s=%s", k1, v1), "--opt", fmt.Sprintf("%s=%s", k2, v2), "--opt", fmt.Sprintf("%s=%s", k3, v3))
  349. out, _ = dockerCmd(c, "volume", "inspect", "--format={{ .Options }}", name)
  350. c.Assert(strings.TrimSpace(out), checker.Contains, fmt.Sprintf("%s:%s", k1, v1))
  351. c.Assert(strings.TrimSpace(out), checker.Contains, fmt.Sprintf("%s:%s", k2, v2))
  352. c.Assert(strings.TrimSpace(out), checker.Contains, fmt.Sprintf("%s:%s", k3, v3))
  353. }