Skip to content

Commit

Permalink
Merge pull request #369 from DFE-Digital/hotfix-zap-tests
Browse files Browse the repository at this point in the history
Fix env vars being overwritten in zap tests
  • Loading branch information
DrizzlyOwl authored Aug 16, 2023
2 parents baad968 + 9416822 commit 27788b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CypressTests/cypress/plugins/generateZapReport.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ const fs = require('fs')

module.exports = {
generateZapHTMLReport: async () => {

console.log('Generating ZAP report')

const zapOptions = {
apiKey: process.env.ZAP_API_KEY,
proxy: {
Expand Down
3 changes: 0 additions & 3 deletions CypressTests/cypress/plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config

// Map process env var to cypress var for usage outside of Cypress run
process.env = config.env

// eslint-disable-next-line no-unused-vars
on('after:run', async () => {
if(process.env.ZAP) {
Expand Down

0 comments on commit 27788b8

Please sign in to comment.