Skip to content
This repository was archived by the owner on Mar 3, 2026. It is now read-only.
Merged
Changes from 2 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
30 changes: 16 additions & 14 deletions system-test/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1332,7 +1332,11 @@ describe('storage', () => {
await bucket.addLifecycleRule({
action: 'delete',
condition: {
<<<<<<< HEAD
Comment thread
shaffeeullah marked this conversation as resolved.
Outdated
matchesPrefix: [TESTS_PREFIX]
=======
matches_prefix: [TESTS_PREFIX],
>>>>>>> 625788e33cc329b771c024a4d225fc8b43ac8256
},
});

Expand All @@ -1341,9 +1345,9 @@ describe('storage', () => {
(rule: LifecycleRule) =>
typeof rule.action === 'object' &&
rule.action.type === 'Delete' &&
typeof rule.condition.matches_prefix === 'object' &&
(rule.condition.matches_prefix as string[]).length === 1 &&
(rule.condition.matches_prefix as string[])[0] === TESTS_PREFIX
typeof rule.condition.matchesPrefix === 'object' &&
(rule.condition.matchesPrefix as string[]).length === 1 &&
(rule.condition.matchesPrefix as string[])[0] === TESTS_PREFIX
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: You can use Array.isArray here to avoid casting

)
);
});
Expand All @@ -1352,7 +1356,7 @@ describe('storage', () => {
await bucket.addLifecycleRule({
action: 'delete',
condition: {
matches_suffix: [TESTS_PREFIX, 'test_suffix'],
matchesSuffix: [TESTS_PREFIX, "test_suffix"]
},
});

Expand All @@ -1361,7 +1365,7 @@ describe('storage', () => {
(rule: LifecycleRule) =>
typeof rule.action === 'object' &&
rule.action.type === 'Delete' &&
(rule.condition.matches_suffix as string[]).length === 2
(rule.condition.matchesSuffix as string[]).length === 2
)
);
});
Expand Down Expand Up @@ -1448,13 +1452,11 @@ describe('storage', () => {
},
});

await bucket.addLifecycleRule(
{
action: 'delete',
condition: {
matches_prefix: [TESTS_PREFIX],
matches_suffix: [TESTS_PREFIX],
},
await bucket.addLifecycleRule({
action: 'delete',
condition: {
matchesPrefix: [TESTS_PREFIX],
matchesSuffix: [TESTS_PREFIX]
},
{append: true}
);
Expand All @@ -1466,8 +1468,8 @@ describe('storage', () => {
rule.action.type === 'Delete' &&
rule.condition.customTimeBefore === CUSTOM_TIME_BEFORE &&
rule.condition.daysSinceCustomTime === 100 &&
(rule.condition.matches_prefix as string[]).length === 1 &&
(rule.condition.matches_suffix as string[]).length === 1
(rule.condition.matchesPrefix as string[]).length === 1 &&
(rule.condition.matchesSuffix as string[]).length === 1
)
);
});
Expand Down