@@ -17,6 +17,13 @@ describe("parsePlanetaryComputerContainer", () => {
1717 } ) ;
1818 } ) ;
1919
20+ test ( "parses public storage to null" , ( ) => {
21+ const result = parsePlanetaryComputerContainer (
22+ "https://ai4edatasetspublicassets.blob.core.windows.net/assets/path/to/file.tiff"
23+ ) ;
24+ expect ( result ) . toBeNull ( ) ;
25+ } ) ;
26+
2027 test ( "returns null for non-Azure URL" , ( ) => {
2128 expect (
2229 parsePlanetaryComputerContainer ( "https://example.com/file.tiff" )
@@ -42,7 +49,7 @@ describe("signPlanetaryComputerHref", () => {
4249 test ( "adds token to URL query string" , ( ) => {
4350 const token : PlanetaryComputerToken = {
4451 token : "sv=2019-12-12&st=2021-01-01&se=2021-01-02&sr=c&sp=rl&sig=abc123" ,
45- msft_request_id : "request-id ",
52+ "msft:expiry" : "2026-02-05T12:00:00Z ",
4653 } ;
4754 const result = signPlanetaryComputerHref (
4855 "https://myaccount.blob.core.windows.net/container/file.tiff" ,
@@ -56,7 +63,7 @@ describe("signPlanetaryComputerHref", () => {
5663 test ( "replaces existing query string" , ( ) => {
5764 const token : PlanetaryComputerToken = {
5865 token : "newsig=xyz" ,
59- msft_request_id : "request-id ",
66+ "msft:expiry" : "2026-02-05T12:00:00Z ",
6067 } ;
6168 const result = signPlanetaryComputerHref (
6269 "https://myaccount.blob.core.windows.net/container/file.tiff?oldsig=abc" ,
@@ -74,7 +81,7 @@ describe("signPlanetaryComputerHrefFromTokens", () => {
7481 myaccount : {
7582 mycontainer : {
7683 token : "sig=abc123" ,
77- msft_request_id : "request-id ",
84+ "msft:expiry" : "2026-02-05T12:00:00Z ",
7885 } ,
7986 } ,
8087 } ;
@@ -101,7 +108,7 @@ describe("signPlanetaryComputerHrefFromTokens", () => {
101108 otheraccount : {
102109 othercontainer : {
103110 token : "sig=abc123" ,
104- msft_request_id : "request-id ",
111+ "msft:expiry" : "2026-02-05T12:00:00Z ",
105112 } ,
106113 } ,
107114 } ;
0 commit comments