Skip to content

Commit 6e046d5

Browse files
committed
Fix test compilation after trunk merge
Added statusKey parameter to all PersistedProduct test objects with value 'publish' to fix compilation errors after trunk merge. Future PRs will handle other product statuses.
1 parent d6d0723 commit 6e046d5

File tree

1 file changed

+33
-20
lines changed

1 file changed

+33
-20
lines changed

Modules/Tests/StorageTests/GRDB/PersistedProductSearchQueryTests.swift

Lines changed: 33 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ struct PersistedProductSearchQueryTests {
3636
parentID: 0,
3737
manageStock: false,
3838
stockQuantity: nil,
39-
stockStatusKey: "instock"
39+
stockStatusKey: "instock",
40+
statusKey: "publish"
4041
)
4142
try await insertProduct(product)
4243

@@ -68,7 +69,8 @@ struct PersistedProductSearchQueryTests {
6869
parentID: 0,
6970
manageStock: false,
7071
stockQuantity: nil,
71-
stockStatusKey: "instock"
72+
stockStatusKey: "instock",
73+
statusKey: "publish"
7274
)
7375
try await insertProduct(product)
7476

@@ -99,7 +101,8 @@ struct PersistedProductSearchQueryTests {
99101
parentID: 0,
100102
manageStock: false,
101103
stockQuantity: nil,
102-
stockStatusKey: "instock"
104+
stockStatusKey: "instock",
105+
statusKey: "publish"
103106
)
104107
try await insertProduct(product)
105108

@@ -132,7 +135,8 @@ struct PersistedProductSearchQueryTests {
132135
parentID: 0,
133136
manageStock: false,
134137
stockQuantity: nil,
135-
stockStatusKey: "instock"
138+
stockStatusKey: "instock",
139+
statusKey: "publish"
136140
)
137141
try await insertProduct(product)
138142

@@ -172,7 +176,8 @@ struct PersistedProductSearchQueryTests {
172176
parentID: 0,
173177
manageStock: false,
174178
stockQuantity: nil,
175-
stockStatusKey: "instock"
179+
stockStatusKey: "instock",
180+
statusKey: "publish"
176181
)
177182
try await insertProduct(product)
178183

@@ -195,19 +200,19 @@ struct PersistedProductSearchQueryTests {
195200
PersistedProduct(id: 6, siteID: siteID, name: "Coffee Beans", productTypeKey: "simple",
196201
fullDescription: nil, shortDescription: nil, sku: nil, globalUniqueID: nil,
197202
price: "15.00", downloadable: false, parentID: 0, manageStock: false,
198-
stockQuantity: nil, stockStatusKey: "instock"),
203+
stockQuantity: nil, stockStatusKey: "instock", statusKey: "publish"),
199204
PersistedProduct(id: 7, siteID: siteID, name: "Coffee Grinder", productTypeKey: "simple",
200205
fullDescription: nil, shortDescription: nil, sku: nil, globalUniqueID: nil,
201206
price: "45.00", downloadable: false, parentID: 0, manageStock: false,
202-
stockQuantity: nil, stockStatusKey: "instock"),
207+
stockQuantity: nil, stockStatusKey: "instock", statusKey: "publish"),
203208
PersistedProduct(id: 8, siteID: siteID, name: "Coffee Maker", productTypeKey: "variable",
204209
fullDescription: nil, shortDescription: nil, sku: nil, globalUniqueID: nil,
205210
price: "100.00", downloadable: false, parentID: 0, manageStock: false,
206-
stockQuantity: nil, stockStatusKey: "instock"),
211+
stockQuantity: nil, stockStatusKey: "instock", statusKey: "publish"),
207212
PersistedProduct(id: 9, siteID: siteID, name: "Tea Strainer", productTypeKey: "variable",
208213
fullDescription: nil, shortDescription: nil, sku: nil, globalUniqueID: nil,
209214
price: "5.00", downloadable: false, parentID: 0, manageStock: false,
210-
stockQuantity: nil, stockStatusKey: "instock")
215+
stockQuantity: nil, stockStatusKey: "instock", statusKey: "publish")
211216
]
212217
for product in products {
213218
try await insertProduct(product)
@@ -241,7 +246,8 @@ struct PersistedProductSearchQueryTests {
241246
parentID: 0,
242247
manageStock: false,
243248
stockQuantity: nil,
244-
stockStatusKey: "instock"
249+
stockStatusKey: "instock",
250+
statusKey: "publish"
245251
)
246252
try await insertProduct(downloadableProduct)
247253

@@ -271,7 +277,8 @@ struct PersistedProductSearchQueryTests {
271277
parentID: 0,
272278
manageStock: false,
273279
stockQuantity: nil,
274-
stockStatusKey: "instock"
280+
stockStatusKey: "instock",
281+
statusKey: "publish"
275282
)
276283
let variableProduct = PersistedProduct(
277284
id: 11,
@@ -287,7 +294,8 @@ struct PersistedProductSearchQueryTests {
287294
parentID: 0,
288295
manageStock: false,
289296
stockQuantity: nil,
290-
stockStatusKey: "instock"
297+
stockStatusKey: "instock",
298+
statusKey: "publish"
291299
)
292300
let groupedProduct = PersistedProduct(
293301
id: 12,
@@ -303,7 +311,8 @@ struct PersistedProductSearchQueryTests {
303311
parentID: 0,
304312
manageStock: false,
305313
stockQuantity: nil,
306-
stockStatusKey: "instock"
314+
stockStatusKey: "instock",
315+
statusKey: "publish"
307316
)
308317
try await insertProduct(simpleProduct)
309318
try await insertProduct(variableProduct)
@@ -347,7 +356,8 @@ struct PersistedProductSearchQueryTests {
347356
parentID: 0,
348357
manageStock: false,
349358
stockQuantity: nil,
350-
stockStatusKey: "instock"
359+
stockStatusKey: "instock",
360+
statusKey: "publish"
351361
)
352362
let otherProduct = PersistedProduct(
353363
id: 14,
@@ -363,7 +373,8 @@ struct PersistedProductSearchQueryTests {
363373
parentID: 0,
364374
manageStock: false,
365375
stockQuantity: nil,
366-
stockStatusKey: "instock"
376+
stockStatusKey: "instock",
377+
statusKey: "publish"
367378
)
368379
try await insertProduct(ourProduct)
369380
try await insertProduct(otherProduct)
@@ -398,7 +409,8 @@ struct PersistedProductSearchQueryTests {
398409
parentID: 0,
399410
manageStock: false,
400411
stockQuantity: nil,
401-
stockStatusKey: "instock"
412+
stockStatusKey: "instock",
413+
statusKey: "publish"
402414
)
403415
try await insertProduct(product)
404416

@@ -430,7 +442,8 @@ struct PersistedProductSearchQueryTests {
430442
parentID: 0,
431443
manageStock: false,
432444
stockQuantity: nil,
433-
stockStatusKey: "instock"
445+
stockStatusKey: "instock",
446+
statusKey: "publish"
434447
)
435448
try await insertProduct(product)
436449

@@ -458,15 +471,15 @@ struct PersistedProductSearchQueryTests {
458471
PersistedProduct(id: 17, siteID: siteID, name: "Zebra Product", productTypeKey: "simple",
459472
fullDescription: nil, shortDescription: nil, sku: "ITEM-Z", globalUniqueID: nil,
460473
price: "10.00", downloadable: false, parentID: 0, manageStock: false,
461-
stockQuantity: nil, stockStatusKey: "instock"),
474+
stockQuantity: nil, stockStatusKey: "instock", statusKey: "publish"),
462475
PersistedProduct(id: 18, siteID: siteID, name: "Alpha Product", productTypeKey: "simple",
463476
fullDescription: nil, shortDescription: nil, sku: "ITEM-A", globalUniqueID: nil,
464477
price: "10.00", downloadable: false, parentID: 0, manageStock: false,
465-
stockQuantity: nil, stockStatusKey: "instock"),
478+
stockQuantity: nil, stockStatusKey: "instock", statusKey: "publish"),
466479
PersistedProduct(id: 19, siteID: siteID, name: "Beta Product", productTypeKey: "simple",
467480
fullDescription: nil, shortDescription: nil, sku: "ITEM-B", globalUniqueID: nil,
468481
price: "10.00", downloadable: false, parentID: 0, manageStock: false,
469-
stockQuantity: nil, stockStatusKey: "instock")
482+
stockQuantity: nil, stockStatusKey: "instock", statusKey: "publish")
470483
]
471484
for product in products {
472485
try await insertProduct(product)

0 commit comments

Comments
 (0)