Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#2180,#2183] Add missing curl include to request_context.h and fix some tests (main) #2189

Merged
merged 2 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions libs3/include/libs3/request_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#ifndef REQUEST_CONTEXT_H
#define REQUEST_CONTEXT_H

#include <curl/curl.h>
#include "libs3/libs3.h"

typedef enum
Expand Down
21 changes: 15 additions & 6 deletions packaging/resource_suite_s3_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def test_iput_with_purgec(self):

try:
self.admin.assert_icommand_fail("ils -L " + filename, 'STDOUT_SINGLELINE', filename) # should not be listed
self.admin.assert_icommand("iput --purgec " + filename) # put file
self.admin.assert_icommand("iput --purgec " + filename, 'STDOUT', 'Specifying a minimum number of replicas to keep is deprecated.') # put file
# should not be listed (trimmed)
self.admin.assert_icommand_fail("ils -L " + filename, 'STDOUT_SINGLELINE', [" 0 ", filename])
# should be listed once - replica 1
Expand All @@ -369,7 +369,9 @@ def test_iput_with_purgec(self):
self.admin.assert_icommand(['irm', '-f', filename])

self.admin.assert_icommand_fail("ils -L " + filename, 'STDOUT_SINGLELINE', filename) # should not be listed
self.admin.assert_icommand(['iput', '-b', '--purgec', filename]) # put file... in bulk!
# put file... in bulk!
self.admin.assert_icommand(
['iput', '-b', '--purgec', filename], 'STDOUT', 'Specifying a minimum number of replicas to keep is deprecated.')
# should not be listed (trimmed)
self.admin.assert_icommand_fail("ils -L " + filename, 'STDOUT_SINGLELINE', [" 0 ", filename])
# should be listed once - replica 1
Expand All @@ -390,7 +392,8 @@ def test_iget_with_purgec(self):
# assertions
self.admin.assert_icommand_fail("ils -L "+filename,'STDOUT_SINGLELINE',filename) # should not be listed
self.admin.assert_icommand("iput "+filename) # put file
self.admin.assert_icommand("iget -f --purgec "+filename) # get file and purge 'cached' replica
# get file and purge 'cached' replica
self.admin.assert_icommand("iget -f --purgec " + filename, 'STDOUT', 'Specifying a minimum number of replicas to keep is deprecated.')
self.admin.assert_icommand_fail("ils -L "+filename,'STDOUT_SINGLELINE',[" 0 ",filename]) # should not be listed (trimmed)
self.admin.assert_icommand("ils -L "+filename,'STDOUT_SINGLELINE',[" 1 ",filename]) # should be listed once
self.admin.assert_icommand_fail("ils -L "+filename,'STDOUT_SINGLELINE',[" 2 ",filename]) # should not be listed
Expand All @@ -409,7 +412,9 @@ def test_irepl_with_purgec(self):
# assertions
self.admin.assert_icommand_fail("ils -L "+filename,'STDOUT_SINGLELINE',filename) # should not be listed
self.admin.assert_icommand("iput "+filename) # put file
self.admin.assert_icommand("irepl -R " + self.testresc + " --purgec " + filename) # replicate to test resource
self.admin.assert_icommand(
"irepl -R " + self.testresc + " --purgec " + filename,
'STDOUT', 'Specifying a minimum number of replicas to keep is deprecated.') # replicate to test resource
self.admin.assert_icommand_fail("ils -L "+filename,'STDOUT_SINGLELINE',[" 0 ",filename]) # should not be listed (trimmed)
self.admin.assert_icommand("ils -L "+filename,'STDOUT_SINGLELINE',[" 1 ",filename]) # should be listed twice - 2 of 3
self.admin.assert_icommand("ils -L "+filename,'STDOUT_SINGLELINE',[" 2 ",filename]) # should be listed twice - 1 of 3
Expand Down Expand Up @@ -459,7 +464,9 @@ def test_decoupled_naming_policy(self):
session.assert_icommand("imv %s %s" % (filename, new_filename))

# get and purge cache replica
session.assert_icommand("iget -f --purgec %s" % new_filename) # get file and purge 'cached' replica
session.assert_icommand(
"iget -f --purgec %s" % new_filename,
'STDOUT', 'Specifying a minimum number of replicas to keep is deprecated.') # get file and purge 'cached' replica

# get again now that it is not in cache
session.assert_icommand("iget -f %s" % new_filename) # get file
Expand Down Expand Up @@ -512,7 +519,9 @@ def test_decoupled_naming_policy_issue1855(self):
session.assert_icommand("imv %s %s" % (filename, new_filename))

# get and purge cache replica
session.assert_icommand("iget -f --purgec %s" % new_filename) # get file and purge 'cached' replica
session.assert_icommand(
"iget -f --purgec %s" % new_filename,
'STDOUT', 'Specifying a minimum number of replicas to keep is deprecated.') # get file and purge 'cached' replica

# get again now that it is not in cache
session.assert_icommand("iget -f %s" % new_filename) # get file
Expand Down
8 changes: 5 additions & 3 deletions packaging/resource_suite_s3_nocache.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ def test_iget_with_purgec(self):
# assertions
self.admin.assert_icommand("ils -L " + filename, 'STDERR_SINGLELINE', "does not exist") # should not be listed
self.admin.assert_icommand("iput " + filename) # put file
self.admin.assert_icommand("iget -f --purgec " + filename) # get file
self.admin.assert_icommand("iget -f --purgec " + filename, 'STDOUT', 'Specifying a minimum number of replicas to keep is deprecated.') # get file
self.admin.assert_icommand("ils -L " + filename, 'STDOUT_SINGLELINE', [" 0 ", filename]) # should be listed once
self.admin.assert_icommand_fail("ils -L " + filename, 'STDOUT_SINGLELINE', [" 1 ", filename]) # should be listed only once
self.admin.assert_icommand_fail("ils -L " + filename, 'STDOUT_SINGLELINE', [" 2 ", filename]) # should be listed only once
Expand Down Expand Up @@ -732,7 +732,7 @@ def test_iput_with_purgec(self):

# assertions
self.admin.assert_icommand("ils -L " + filename, 'STDERR_SINGLELINE', "does not exist") # should not be listed
self.admin.assert_icommand("iput --purgec " + filename) # put file
self.admin.assert_icommand("iput --purgec " + filename, 'STDOUT', 'Specifying a minimum number of replicas to keep is deprecated.') # put file
self.admin.assert_icommand("ils -L " + filename, 'STDOUT_SINGLELINE', [" 0 ", filename]) # should be listed once
self.admin.assert_icommand_fail("ils -L " + filename, 'STDOUT_SINGLELINE', [" 1 ", filename]) # should be listed only once
self.admin.assert_icommand_fail("ils -L " + filename, 'STDOUT_SINGLELINE', [" 2 ", filename]) # should be listed only once
Expand Down Expand Up @@ -959,7 +959,9 @@ def test_irepl_with_purgec(self):
# assertions
self.admin.assert_icommand("ils -L " + filename, 'STDERR_SINGLELINE', "does not exist") # should not be listed
self.admin.assert_icommand("iput " + filename) # put file
self.admin.assert_icommand("irepl -R " + self.testresc + " --purgec " + filename) # replicate to test resource
self.admin.assert_icommand(
"irepl -R " + self.testresc + " --purgec " + filename,
'STDOUT', 'Specifying a minimum number of replicas to keep is deprecated.') # replicate to test resource
self.admin.assert_icommand_fail("ils -L " + filename, 'STDOUT_SINGLELINE', [" 0 ", filename]) # should be trimmed
self.admin.assert_icommand("ils -L " + filename, 'STDOUT_SINGLELINE', [" 1 ", filename]) # should be listed once
self.admin.assert_icommand_fail("ils -L " + filename, 'STDOUT_SINGLELINE', [" 2 ", filename]) # should be listed only once
Expand Down
8 changes: 5 additions & 3 deletions packaging/test_irods_resource_plugin_s3_for_cloudian.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def test_iput_with_purgec(self):

# assertions
self.admin.assert_icommand_fail("ils -L "+filename,'STDOUT_SINGLELINE',filename) # should not be listed
self.admin.assert_icommand("iput --purgec "+filename) # put file
self.admin.assert_icommand("iput --purgec " + filename, 'STDOUT', 'Specifying a minimum number of replicas to keep is deprecated.') # put file
self.admin.assert_icommand_fail("ils -L "+filename,'STDOUT_SINGLELINE',[" 0 ",filename]) # should not be listed (trimmed)
self.admin.assert_icommand("ils -L "+filename,'STDOUT_SINGLELINE',[" 1 ",filename]) # should be listed once - replica 1
self.admin.assert_icommand_fail("ils -L "+filename,'STDOUT_SINGLELINE',[" 2 ",filename]) # should be listed only once
Expand All @@ -309,7 +309,7 @@ def test_iget_with_purgec(self):
# assertions
self.admin.assert_icommand_fail("ils -L "+filename,'STDOUT_SINGLELINE',filename) # should not be listed
self.admin.assert_icommand("iput "+filename) # put file
self.admin.assert_icommand("iget -f --purgec "+filename) # get file and purge 'cached' replica
self.admin.assert_icommand("iget -f --purgec " + filename, 'STDOUT', 'Specifying a minimum number of replicas to keep is deprecated.') # get file and purge 'cached' replica
self.admin.assert_icommand_fail("ils -L "+filename,'STDOUT_SINGLELINE',[" 0 ",filename]) # should not be listed (trimmed)
self.admin.assert_icommand("ils -L "+filename,'STDOUT_SINGLELINE',[" 1 ",filename]) # should be listed once
self.admin.assert_icommand_fail("ils -L "+filename,'STDOUT_SINGLELINE',[" 2 ",filename]) # should not be listed
Expand All @@ -328,7 +328,9 @@ def test_irepl_with_purgec(self):
# assertions
self.admin.assert_icommand_fail("ils -L "+filename,'STDOUT_SINGLELINE',filename) # should not be listed
self.admin.assert_icommand("iput "+filename) # put file
self.admin.assert_icommand("irepl -R "+self.testresc+" --purgec "+filename) # replicate to test resource
self.admin.assert_icommand(
"irepl -R " + self.testresc + " --purgec " + filename,
'STDOUT', 'Specifying a minimum number of replicas to keep is deprecated.') # replicate to test resource
self.admin.assert_icommand_fail("ils -L "+filename,'STDOUT_SINGLELINE',[" 0 ",filename]) # should not be listed (trimmed)
self.admin.assert_icommand("ils -L "+filename,'STDOUT_SINGLELINE',[" 1 ",filename]) # should be listed twice - 2 of 3
self.admin.assert_icommand("ils -L "+filename,'STDOUT_SINGLELINE',[" 2 ",filename]) # should be listed twice - 1 of 3
Expand Down
Loading