1. 09 5月, 2022 5 次提交
  2. 07 5月, 2022 4 次提交
  3. 06 5月, 2022 8 次提交
  4. 05 5月, 2022 10 次提交
  5. 04 5月, 2022 1 次提交
    • E
      test: use `T.TempDir` to create temporary test directory (#16758) · 53751617
      Eng Zer Jun 提交于
      This commit replaces `ioutil.TempDir` with `t.TempDir` in tests. The
      directory created by `t.TempDir` is automatically removed when the test
      and all its subtests complete.
      
      Prior to this commit, temporary directory created using `ioutil.TempDir`
      needs to be removed manually by calling `os.RemoveAll`, which is omitted
      in some tests. The error handling boilerplate e.g.
      	defer func() {
      		if err := os.RemoveAll(dir); err != nil {
      			t.Fatal(err)
      		}
      	}
      is also tedious, but `t.TempDir` handles this for us nicely.
      
      Fixes: #16759
      Reference: https://pkg.go.dev/testing#T.TempDirSigned-off-by: NEng Zer Jun <engzerjun@gmail.com>
      53751617
  6. 03 5月, 2022 2 次提交
  7. 02 5月, 2022 1 次提交
  8. 29 4月, 2022 9 次提交