fix tar test - generate new archive in test
This commit is contained in:
parent
cb923b96c9
commit
4c3b736efb
@ -305,7 +305,6 @@ func TestClientImportTar(t *testing.T) {
|
|||||||
c := NewClient()
|
c := NewClient()
|
||||||
assert.NotNil(t, c)
|
assert.NotNil(t, c)
|
||||||
|
|
||||||
/*
|
|
||||||
e := TarArchive(true)
|
e := TarArchive(true)
|
||||||
assert.Nil(t, e)
|
assert.Nil(t, e)
|
||||||
assert.Greater(t, tarArchiveBuffer.Len(), 0)
|
assert.Greater(t, tarArchiveBuffer.Len(), 0)
|
||||||
@ -313,18 +312,10 @@ func TestClientImportTar(t *testing.T) {
|
|||||||
path, err := TempDir.CreateFileFromReader("test.tar.gz", &tarArchiveBuffer)
|
path, err := TempDir.CreateFileFromReader("test.tar.gz", &tarArchiveBuffer)
|
||||||
assert.Nil(t, err)
|
assert.Nil(t, err)
|
||||||
uri := fmt.Sprintf("file://%s", path)
|
uri := fmt.Sprintf("file://%s", path)
|
||||||
*/
|
|
||||||
|
|
||||||
uri := "file:///tmp/jx-v0.2.3.tar.gz"
|
|
||||||
|
|
||||||
d := folio.NewDeclaration()
|
d := folio.NewDeclaration()
|
||||||
assert.Nil(t, d.NewResource(&uri))
|
assert.Nil(t, d.NewResource(&uri))
|
||||||
|
|
||||||
//assert.Equal(t, "11f08defe14cf8710583158c86e175bab40bfdbcd5ffb491479aacb8492ebf67", )
|
|
||||||
//var sourceResource data.FileResource = d.Attributes.(data.FileResource)
|
|
||||||
//assert.Nil(t, sourceResource.SetContent(&tarArchiveBuffer))
|
|
||||||
//sourceResource.SetDecodeContent(true)
|
|
||||||
|
|
||||||
docs, importErr := c.ImportSource(uri)
|
docs, importErr := c.ImportSource(uri)
|
||||||
|
|
||||||
assert.Nil(t, importErr)
|
assert.Nil(t, importErr)
|
||||||
|
Loading…
Reference in New Issue
Block a user