1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-12 10:55:20 +02:00
Jenkins shared library for Continuous Delivery pipelines.
Go to file
Eng Zer Jun 0f4e30e9db
test: use T.TempDir to create temporary test directory (#3721)
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.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2022-07-12 15:19:12 +02:00
.github publishing master binary once after all builds (#3885) 2022-07-11 11:30:38 +02:00
.hooks chore(go): add pre-commit hook (#1006) 2019-11-27 21:16:01 +01:00
.pipeline Update config.yml (#2371) 2020-11-13 16:51:25 +01:00
.reuse compliance with reuse (#1910) 2020-08-11 11:53:42 +02:00
cfg Deploy mkdocs when merging to master 2018-03-12 09:58:32 +01:00
cmd test: use T.TempDir to create temporary test directory (#3721) 2022-07-12 15:19:12 +02:00
consumer-test Integration Tests fail - edu.hm.hafner (#3071) 2021-08-25 20:51:54 +02:00
contrib Allow to trigger release manually (#1359) 2020-04-03 16:26:53 +02:00
documentation ApiProviderList Command (#3879) 2022-07-07 15:48:59 +03:00
integration test: use T.TempDir to create temporary test directory (#3721) 2022-07-12 15:19:12 +02:00
LICENSES compliance with reuse (#1910) 2020-08-11 11:53:42 +02:00
pkg test: use T.TempDir to create temporary test directory (#3721) 2022-07-12 15:19:12 +02:00
resources feat: allow OSVM scans to succeed with vulnerabilities (#3889) 2022-07-12 11:43:24 +02:00
src/com/sap/piper feat(codeql) merge commit git reference (#3877) 2022-07-12 10:25:17 +02:00
template remove !#groovy header 2019-05-23 10:37:28 +02:00
test feat(codeql) merge commit git reference (#3877) 2022-07-12 10:25:17 +02:00
vars feat(codeql) merge commit git reference (#3877) 2022-07-12 10:25:17 +02:00
.codeclimate.yml chore(ci): add yamllint action (#2774) 2021-04-22 12:55:35 +02:00
.editorconfig Add golang implementation for karma tests (#919) 2019-10-25 14:58:59 +02:00
.gitignore Add ABAP step: createTag (#3633) 2022-05-23 15:15:22 +02:00
.markdownlint.yml chore(ci): add yamllint action (#2774) 2021-04-22 12:55:35 +02:00
.yamllint.yml chore(ci): add yamllint action (#2774) 2021-04-22 12:55:35 +02:00
config.toml Add revive config for proper linting 2020-02-26 09:44:18 +01:00
DEVELOPMENT.md Upgrade Dockerfile to Go 1.18 (#3845) 2022-06-22 15:59:47 +02:00
Dockerfile Upgrade Dockerfile to Go 1.18 (#3845) 2022-06-22 15:59:47 +02:00
go.mod ApiProxyList Command (#3794) 2022-06-21 13:08:00 +02:00
go.sum ApiProxyList Command (#3794) 2022-06-21 13:08:00 +02:00
LICENSE chore(license): update LICENSE text (#2855) 2021-05-26 09:58:12 +02:00
main.go Step generation: allow usage of go generate (#1793) 2020-07-17 08:06:11 +02:00
pom.xml Update snakeyaml to fix security vulnerability (#2878) 2021-06-09 12:59:01 +02:00
README.md fix: markdownlint findings for MD012 (#2383) 2020-11-16 18:22:38 +01:00
staticcheck.conf add staticcheck github action (#3605) 2022-03-07 14:52:20 +01:00

Maintainability Test Coverage Go Report Card REUSE status

Project Piper Repository

The Project "Piper" offers default pipelines to easily implement CI/CD processes integrating SAP systems. The corresponding "Shared Library" provides a set of "steps" to build your own scenarios beyond defaults.

User Documentation

If you want to view the User Documentation of Project Piper please follow this Piper Pages Link.

Known Issues

A list of known issues is available on the GitHub issues page of this project.

How to obtain support

Feel free to open new issues for feature requests, bugs or general feedback on the GitHub issues page of this project.

Register to our google group in order to get updates or for asking questions.

Contributing

Read and understand our contribution guidelines before opening a pull request.