[go: nahoru, domu]

Skip to content

Commit

Permalink
Remove node version checks in tests (firebase#2952)
Browse files Browse the repository at this point in the history
* Remove node version checks in tests

* Lint

* Review fix
  • Loading branch information
samtstern committed Dec 17, 2020
1 parent c67f572 commit 5981ff0
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 49 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/node-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ jobs:
- run: npm ci
- run: echo ${{ secrets.service_account_json_base64 }} | base64 -d > ./scripts/service-account.json
- run: ${{ matrix.script }}
env:
NODE_VERSION: ${{ matrix.node-version }}

- name: Print debug logs
if: failure()
Expand Down
9 changes: 0 additions & 9 deletions scripts/hosting-tests/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,6 @@ kill "$PID"
wait
echo "Tested local hosting emulator."

# This test can only run on one Node version in the matrix because if it runs twice
# in parallel the deploys will clobber each other. This is only a temporary
# workaround, when we update the CLI to stop supporting Node 8 we can remove
# this hack or find some way to lock.
if [ "${NODE_VERSION}" != 8* ]; then
echo "Not running deployment tests on Node version ${NODE_VERSION}"
exit 0
fi

echo "Testing hosting deployment..."
firebase deploy --only hosting --project "${FBTOOLS_TARGET_PROJECT}"
sleep 5
Expand Down
17 changes: 0 additions & 17 deletions scripts/triggers-end-to-end-tests/functions/package.8.json

This file was deleted.

7 changes: 0 additions & 7 deletions scripts/triggers-end-to-end-tests/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,8 @@
source scripts/set-default-credentials.sh
./scripts/npm-link.sh

echo "NODE_VERSION=$NODE_VERSION"
(
cd scripts/triggers-end-to-end-tests/functions
if [ "$NODE_VERSION" == 8* ]; then
cp package{.8,}.json
else
cp package{.12,}.json
fi

npm install
)

Expand Down
15 changes: 1 addition & 14 deletions scripts/triggers-end-to-end-tests/tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import * as path from "path";
import { CLIProcess } from "../integration-helpers/cli";
import { FrameworkOptions, TriggerEndToEndTest } from "../integration-helpers/framework";

const NODE_VERSION = Number.parseInt(process.env.NODE_VERSION || "8");

const FIREBASE_PROJECT = process.env.FBTOOLS_TARGET_PROJECT || "";
const ADMIN_CREDENTIAL = {
getAccessToken: () => {
Expand Down Expand Up @@ -227,23 +225,12 @@ describe("auth emulator function triggers", () => {

it("should write to the auth emulator", async function(this) {
this.timeout(EMULATOR_TEST_TIMEOUT);

// This test only works on Node 10+
if (NODE_VERSION < 10) {
this.skip();
}

const response = await test.writeToAuth();
expect(response.status).to.equal(200);
await new Promise((resolve) => setTimeout(resolve, EMULATORS_WRITE_DELAY_MS));
});

it("should have have triggered cloud functions", function(this) {
// This test only works on Node 10+
if (NODE_VERSION < 10) {
this.skip();
}

it("should have have triggered cloud functions", () => {
expect(test.authTriggerCount).to.equal(1);
});
});
Expand Down

0 comments on commit 5981ff0

Please sign in to comment.