Skip to content

Commit

Permalink
test: rename env variables (samrum#174)
Browse files Browse the repository at this point in the history
* test: rename env variables

* chore: update actions to use new env variables
  • Loading branch information
samrum authored Dec 7, 2021
1 parent de49e2d commit 0be8ad9
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
6 changes: 3 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
DEVICEID="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
VIN="1G2ZF58B774109863"
USERNAME="[email protected]"
PASSWORD="p@ssw0rd"
ONSTARPIN="1234"
ONSTAR_USERNAME="[email protected]"
ONSTAR_PASSWORD="p@ssw0rd"
ONSTAR_PIN="1234"
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ jobs:
env:
DEVICEID: ${{ secrets.FUNCTIONAL_TEST_DEVICEID }}
VIN: ${{ secrets.FUNCTIONAL_TEST_VIN }}
USERNAME: ${{ secrets.FUNCTIONAL_TEST_USERNAME }}
PASSWORD: ${{ secrets.FUNCTIONAL_TEST_PASSWORD }}
ONSTARPIN: ${{ secrets.FUNCTIONAL_TEST_ONSTARPIN }}
ONSTAR_USERNAME: ${{ secrets.FUNCTIONAL_TEST_USERNAME }}
ONSTAR_PASSWORD: ${{ secrets.FUNCTIONAL_TEST_PASSWORD }}
ONSTAR_PIN: ${{ secrets.FUNCTIONAL_TEST_ONSTARPIN }}
6 changes: 3 additions & 3 deletions .github/workflows/key-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ jobs:
env:
DEVICEID: ${{ secrets.FUNCTIONAL_TEST_DEVICEID }}
VIN: ${{ secrets.FUNCTIONAL_TEST_VIN }}
USERNAME: ${{ secrets.FUNCTIONAL_TEST_USERNAME }}
PASSWORD: ${{ secrets.FUNCTIONAL_TEST_PASSWORD }}
ONSTARPIN: ${{ secrets.FUNCTIONAL_TEST_ONSTARPIN }}
ONSTAR_USERNAME: ${{ secrets.FUNCTIONAL_TEST_USERNAME }}
ONSTAR_PASSWORD: ${{ secrets.FUNCTIONAL_TEST_PASSWORD }}
ONSTAR_PIN: ${{ secrets.FUNCTIONAL_TEST_ONSTARPIN }}
11 changes: 6 additions & 5 deletions test/functional/OnStarJs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import OnStar from "../../src/index";

jest.setTimeout(15000);

const { DEVICEID, VIN, USERNAME, PASSWORD, ONSTARPIN } = process.env;
const { DEVICEID, VIN, ONSTAR_USERNAME, ONSTAR_PASSWORD, ONSTAR_PIN } =
process.env;

if (!DEVICEID || !VIN || !USERNAME || !PASSWORD || !ONSTARPIN) {
if (!DEVICEID || !VIN || !ONSTAR_USERNAME || !ONSTAR_PASSWORD || !ONSTAR_PIN) {
throw new Error("Missing environment config for functional tests");
}

Expand All @@ -17,9 +18,9 @@ describe("OnStarJs", () => {
onStar = OnStar.create({
deviceId: DEVICEID,
vin: VIN,
username: USERNAME,
password: PASSWORD,
onStarPin: ONSTARPIN,
username: ONSTAR_USERNAME,
password: ONSTAR_PASSWORD,
onStarPin: ONSTAR_PIN,
checkRequestStatus: false,
});
});
Expand Down

0 comments on commit 0be8ad9

Please sign in to comment.