fix tar test - generate new archive in test
All checks were successful
Lint / golangci-lint (push) Successful in 10m33s
Declarative Tests / test (push) Successful in 41s

This commit is contained in:
Matthew Rich 2024-10-04 00:52:04 +00:00
parent cb923b96c9
commit 4c3b736efb

View File

@ -305,7 +305,6 @@ func TestClientImportTar(t *testing.T) {
c := NewClient()
assert.NotNil(t, c)
/*
e := TarArchive(true)
assert.Nil(t, e)
assert.Greater(t, tarArchiveBuffer.Len(), 0)
@ -313,18 +312,10 @@ func TestClientImportTar(t *testing.T) {
path, err := TempDir.CreateFileFromReader("test.tar.gz", &tarArchiveBuffer)
assert.Nil(t, err)
uri := fmt.Sprintf("file://%s", path)
*/
uri := "file:///tmp/jx-v0.2.3.tar.gz"
d := folio.NewDeclaration()
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)
assert.Nil(t, importErr)