Skip to content

Commit

Permalink
Added implementation for Google cloud storage (#120)
Browse files Browse the repository at this point in the history
* Added implementation for node.js google storage

* GCS frontend implementation

* Make env variables consistent for GCP tests

* Another env variable rename

* Debug pipeline

* Pipelines fix attempt

* Hardcoding secure file name

* Fix npm audit issues

* Downgrade ESLint

* Fix references to gcs

* Remove duplicated helpers

* Lint fix

* Switch google frontend tests server port
  • Loading branch information
Animagne authored Nov 25, 2024
1 parent 0d9d154 commit efac07d
Show file tree
Hide file tree
Showing 70 changed files with 3,426 additions and 687 deletions.
49 changes: 49 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,23 @@
"<node_internals>/**"
]
},
{
"name": "Google Unit tests",
"cwd": "${workspaceFolder}/storage/google",
"type": "pwa-node",
"request": "launch",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run",
"test:unit"
],
"outFiles": [
"${workspaceFolder}/*/*/lib/**/*.js"
],
"skipFiles": [
"<node_internals>/**"
]
},
{
"name": "S3 Backend Unit tests",
"cwd": "${workspaceFolder}/storage/s3",
Expand Down Expand Up @@ -128,6 +145,24 @@
"<node_internals>/**"
]
},
{
"name": "Backend Google Integration tests",
"cwd": "${workspaceFolder}/storage/google",
"type": "pwa-node",
"request": "launch",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run",
"test:integration:backend"
],
"outFiles": [
"${workspaceFolder}/*/*/lib/**/*.js"
],
"skipFiles": [
"<node_internals>/**"
],
"envFile": "${workspaceFolder}/storage/google/src/test/.env"
},
{
"name": "Backend OSS Integration tests",
"cwd": "${workspaceFolder}/storage/oss",
Expand Down Expand Up @@ -197,6 +232,20 @@
"DEBUG": "1"
}
},
{
"name": "Frontend Google Integration tests",
"cwd": "${workspaceFolder}/storage/google",
"type": "pwa-node",
"request": "launch",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run",
"test:integration:frontend"
],
"env": {
"DEBUG": "1"
}
},
{
"name": "Frontend OSS Integration tests",
"cwd": "${workspaceFolder}/storage/oss",
Expand Down
7 changes: 4 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@
}
],
"editor.codeActionsOnSave": {
"source.fixAll.markdownlint": true, // first run the markdown linter
"editor.action.fixAll": true, // Run the default formatter before eslint, it handles whitespace better
"source.fixAll.eslint": true // then run ESLint auto-fix
"source.fixAll.markdownlint": "explicit",
"editor.action.fixAll": "explicit",
"source.fixAll.eslint": "explicit"
},
"cSpell.import": ["${workspaceFolder}/utils/common-config/cspell.json"]
}
6 changes: 3 additions & 3 deletions cloud-agnostic/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
"@types/chai": "^4.3.8",
"@types/mocha": "^10.0.1",
"chai": "^4.3.10",
"cspell": "^5.18.5",
"cypress": "^13.12.0",
"eslint": "^8.42.0",
"cspell": "^8.16.0",
"cypress": "^13.16.0",
"eslint": "^8.57.1",
"inversify": "^6.0.1",
"mocha": "^10.4.0",
"nyc": "^14.0.0",
Expand Down
8 changes: 8 additions & 0 deletions common/config/azure-pipelines/templates/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ steps:
versionSpec: $(nodeVersion)
checkLatest: true

- task: DownloadSecureFile@1
name: DownloadGCPAuthFile
displayName: 'Download GCP Secure Auth File'
inputs:
secureFile: 'object-storage-tests-connection.json'

- script: node common/scripts/install-run-rush.js install --purge
displayName: rush install

Expand All @@ -33,9 +39,11 @@ steps:
displayName: rush test:integration:backend
env:
TEST_AZURE_STORAGE_ACCOUNT_KEY: $(TEST_AZURE_STORAGE_ACCOUNT_KEY)
GOOGLE_APPLICATION_CREDENTIALS: $(DownloadGCPAuthFile.secureFilePath)

- script: node common/scripts/install-run-rush.js test:integration:frontend --only tag:integration-tested --verbose
displayName: rush test:integration:frontend
condition: and(succeeded(), eq(variables.runFrontendIntegrationTests, true))
env:
TEST_AZURE_STORAGE_ACCOUNT_KEY: $(TEST_AZURE_STORAGE_ACCOUNT_KEY)
GOOGLE_APPLICATION_CREDENTIALS: $(DownloadGCPAuthFile.secureFilePath)
Loading

0 comments on commit efac07d

Please sign in to comment.