Skip to content

Commit 1746e4c

Browse files
committed
chore: fix postdeploy test
1 parent f0573ea commit 1746e4c

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

.github/workflows/main.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ jobs:
4848
run: npm run deploy:ci
4949
- name: Post-Deployment Integration Test
5050
run: npm run test-postdeploy
51+
env:
52+
SUPERUSER_KEY: ${{ secrets.SUPERUSER_KEY }}
5153
- name: Semantic Release (Dry Run)
5254
run: npm run semantic-release-dry
5355
env:

test/post-deploy.test.js

+9-11
Original file line numberDiff line numberDiff line change
@@ -98,18 +98,16 @@ describe('Post-Deploy Tests', () => {
9898
});
9999

100100
it('can PUT, GET, lookup, and DELETE a product', async () => {
101-
const putOpts = {
102-
...getFetchOptions(
103-
`/dylandepass/commerce-boilerplate/catalog/main_website_store/default/products/${testProduct.sku}`,
104-
{
105-
method: 'PUT',
106-
headers: {
107-
'Content-Type': 'application/json',
108-
},
109-
body: JSON.stringify(testProduct),
101+
const putOpts = getFetchOptions(
102+
`/dylandepass/commerce-boilerplate/catalog/main_website_store/default/products/${testProduct.sku}`,
103+
{
104+
method: 'PUT',
105+
headers: {
106+
'Content-Type': 'application/json',
110107
},
111-
),
112-
};
108+
body: JSON.stringify(testProduct),
109+
},
110+
);
113111
const putRes = await fetch(putOpts.url, putOpts);
114112
assert.strictEqual(putRes.status, 201, 'PUT request should succeed');
115113

0 commit comments

Comments
 (0)