File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 82
82
83
83
# Test that the format string in the error message is properly setup and won't display `%s` instead of the failed URI
84
84
msg = client.fail("${ env } nix eval --impure --expr 'builtins.fetchurl { name = \"foo\"; url = \"${ objectThatDoesNotExist } \"; }' 2>&1")
85
- if "S3 object '${ objectThatDoesNotExist } ' does not exist " not in msg:
85
+ if "unable to download '${ objectThatDoesNotExist } ': HTTP error 404 " not in msg:
86
86
print(msg) # So that you can see the message that was improperly formatted
87
87
raise Exception("Error message formatting didn't work")
88
88
89
89
# Copy a package from the binary cache.
90
90
client.fail("nix path-info ${ pkgA } ")
91
91
92
+ # Test nix store info with various S3 URL formats
92
93
client.succeed("${ env } nix store info --store '${ storeUrl } ' >&2")
93
94
95
+ # Test with different region parameter (should work without warnings)
96
+ client.succeed("${ env } nix store info --store 's3://my-cache?endpoint=http://server:9000®ion=us-east-2' >&2")
97
+
98
+ # Test with just bucket name and region
99
+ client.succeed("${ env } nix store info --store 's3://my-cache?region=eu-west-1&endpoint=http://server:9000' >&2")
100
+
101
+ # Test that store info shows the store is available
102
+ info = client.succeed("${ env } nix store info --json --store '${ storeUrl } '")
103
+ import json
104
+ store_info = json.loads(info)
105
+ assert store_info.get("url"), "Store should have a URL"
106
+ print(f"Store URL: {store_info.get('url')}")
107
+
94
108
client.succeed("${ env } nix copy --no-check-sigs --from '${ storeUrl } ' ${ pkgA } ")
95
109
96
110
client.succeed("nix path-info ${ pkgA } ")
You can’t perform that action at this time.
0 commit comments