-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(github-actions): extract deploy & e2e job for deployable flag
- Loading branch information
1 parent
3d0a624
commit 2b08aaa
Showing
3 changed files
with
34 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
import { test, expect } from 'bun:test'; | ||
import supertest from 'supertest'; | ||
|
||
const url = process.env.AZURE_FUNCTIONS_URL; | ||
const apiKey = process.env.AZURE_FUNCTIONS_API_KEY; | ||
if (!url) throw new Error('AZURE_FUNCTIONS_URL not set'); | ||
if (!apiKey) throw new Error('AZURE_FUNCTIONS_API_KEY not set'); | ||
|
||
test('e2e', async () => { | ||
const response = await fetch(new URL(`/api/SimpleHttpTrigger?code=${apiKey}`, url).toString()); | ||
const response = await supertest(url).get(`/api/SimpleHttpTrigger?code=${apiKey}`); | ||
expect(response.status).toBe(200); | ||
Check failure on line 11 in infra/azure-functions/src/e2e.test.ts GitHub Actions / e2e (ubuntu-latest, node, 20, node18-linux-x64, true, RESOURCE_IDENTIFIER_NODE18_LINUX_X64)error: expect(received).toBe(expected)
Check failure on line 11 in infra/azure-functions/src/e2e.test.ts GitHub Actions / e2e (windows-latest, node, 20, node18-win-x64, true, RESOURCE_IDENTIFIER_NODE18_WIN_X64)error: expect(received).toBe(expected)
|
||
}); |