fix resource test data path
@@ -291,7 +291,7 @@ func TestDeserializeMissingHash(t *testing.T) {
}
func TestAssetFile(t *testing.T) {
- asset, err := NewPathAsset("./testdata/Fox.txt")
+ asset, err := NewPathAsset("../../../../pkg/resource/testdata/Fox.txt")
assert.Nil(t, err)
assert.Equal(t, "85e5f2698ac92d10d50e2f2802ed0d51a13e7c81d0d0a5998a75349469e774c5", asset.Hash)
assertAssetTextEquals(t, asset,
@@ -303,7 +303,7 @@ asset jumps over the archive.
}
func TestArchiveDir(t *testing.T) {
- arch, err := NewPathArchive("./testdata/test_dir")
+ arch, err := NewPathArchive("../../../../pkg/resource/testdata/test_dir")
assert.Nil(t, err)
switch runtime.Version() {
case go19Version:
@@ -317,7 +317,7 @@ func TestArchiveDir(t *testing.T) {
func TestArchiveTar(t *testing.T) {
// Note that test data was generated using the Go 1.9 headers
- arch, err := NewPathArchive("./testdata/test_dir.tar")
+ arch, err := NewPathArchive("../../../../pkg/resource/testdata/test_dir.tar")
assert.Nil(t, err)
assert.Equal(t, "c618d74a40f87de3092ca6a6c4cca834aa5c6a3956c6ceb2054b40d04bb4cd76", arch.Hash)
validateTestDirArchive(t, arch)
@@ -325,7 +325,7 @@ func TestArchiveTar(t *testing.T) {
func TestArchiveTgz(t *testing.T) {
// Note that test data was generated using the Go 1.9 headers
- arch, err := NewPathArchive("./testdata/test_dir.tgz")
+ arch, err := NewPathArchive("../../../../pkg/resource/testdata/test_dir.tgz")
assert.Nil(t, err)
assert.Equal(t, "f9b33523b6a3538138aff0769ff9e7d522038e33c5cfe28b258332b3f15790c8", arch.Hash)
validateTestDirArchive(t, arch)
@@ -333,7 +333,7 @@ func TestArchiveTgz(t *testing.T) {
func TestArchiveZip(t *testing.T) {
// Note that test data was generated using the Go 1.9 headers
- arch, err := NewPathArchive("./testdata/test_dir.zip")
+ arch, err := NewPathArchive("../../../../pkg/resource/testdata/test_dir.zip")
assert.Nil(t, err)
assert.Equal(t, "343da72cec1302441efd4a490d66f861d393fb270afb3ced27f92a0d96abc068", arch.Hash)
validateTestDirArchive(t, arch)
