mirror of
https://github.com/SAP/jenkins-library.git
synced 2026-06-19 22:58:55 +02:00
chore(deps): Replace io/ioutil package (#4494)
* update all deprecated ioutil usages * forgotten changes * add missing imports * undo changing comment * add missing 'os' import * fix integration test --------- Co-authored-by: I557621 <jordi.van.liempt@sap.com> Co-authored-by: Gulom Alimov <gulomjon.alimov@sap.com>
This commit is contained in:
co-authored by
I557621
Gulom Alimov
parent
69347fe2af
commit
0ba4c2206c
@@ -7,7 +7,6 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
@@ -37,10 +36,10 @@ func TestGitHubIntegrationPiperPublishRelease(t *testing.T) {
|
||||
dir := t.TempDir()
|
||||
|
||||
testAsset := filepath.Join(dir, "test.txt")
|
||||
err := ioutil.WriteFile(testAsset, []byte("Test"), 0644)
|
||||
err := os.WriteFile(testAsset, []byte("Test"), 0644)
|
||||
assert.NoError(t, err, "Error when writing temporary file")
|
||||
test2Asset := filepath.Join(dir, "test2.txt")
|
||||
err = ioutil.WriteFile(test2Asset, []byte("Test"), 0644)
|
||||
err = os.WriteFile(test2Asset, []byte("Test"), 0644)
|
||||
assert.NoError(t, err, "Error when writing temporary file")
|
||||
|
||||
t.Run("test single asset - success", func(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user