Skip to content

Commit

Permalink
Select good golden file for lakectl fs stat --pre-sign test
Browse files Browse the repository at this point in the history
Some lakeFS block adaptors report expiry, others do not.  Test lakectl
using an appropriate golden file
  • Loading branch information
arielshaqed committed Aug 7, 2023
1 parent 29d7cde commit f369b04
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
8 changes: 8 additions & 0 deletions esti/golden/lakectl_stat_pre_sign_with_expiry.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Path: ${PATH}/${FILE}
Modified Time: <DATE> <TIME> <TZ>
Size: 1024 bytes
Human Size: 1.0 kB
Physical Address: <PRE_SIGN_URL>
Physical Address Expires: <DATE> <TIME> <TZ>
Checksum: <CHECKSUM>
Content-Type: application/octet-stream
6 changes: 5 additions & 1 deletion esti/lakectl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,11 @@ func TestLakectlFsStat(t *testing.T) {
if !storageResp.JSON200.PreSignSupport {
t.Skip("No pre-sign support for this storage")
}
RunCmdAndVerifySuccessWithFile(t, Lakectl()+" fs stat --pre-sign lakefs://"+repoName+"/"+mainBranch+"/data/ro/ro_1k.1", false, "lakectl_stat_pre_sign", map[string]string{
goldenFile := "lakectl_stat_pre_sign"
if storageResp.BlockstoreType == "s3" {

Check failure on line 502 in esti/lakectl_test.go

View workflow job for this annotation

GitHub Actions / Run Go tests

storageResp.BlockstoreType undefined (type *"github.com/treeverse/lakefs/pkg/api".GetStorageConfigResponse has no field or method BlockstoreType)

Check failure on line 502 in esti/lakectl_test.go

View workflow job for this annotation

GitHub Actions / Test unified gc

storageResp.BlockstoreType undefined (type *api.GetStorageConfigResponse has no field or method BlockstoreType)
goldenFile = "lakectl_stat_pre_sign_with_expiry"
}
RunCmdAndVerifySuccessWithFile(t, Lakectl()+" fs stat --pre-sign lakefs://"+repoName+"/"+mainBranch+"/data/ro/ro_1k.1", false, goldenFile, map[string]string{
"REPO": repoName,
"STORAGE": storage,
"BRANCH": mainBranch,
Expand Down

0 comments on commit f369b04

Please sign in to comment.