Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hardillb committed Oct 3, 2023
1 parent 76e4b20 commit 26a6b91
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
4 changes: 2 additions & 2 deletions helm/flowforge/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ data:
{{ if and (hasKey .Values.forge.telemetry "sentry") (hasKey .Values.forge.telemetry.sentry "frontend_dsn") -}}
sentry:
dsn: {{ .Values.forge.telemetry.sentry.frontend_dsn}}
{{ if hasKey .Values.forge.telemetry.dsn "production_mode" }}
production_mode: {{ .Values.forge.telemetry.entry.production_mode }}
{{ if hasKey .Values.forge.telemetry.sentry "production_mode" }}
production_mode: {{ .Values.forge.telemetry.sentry.production_mode }}
{{ else }}
production_mode: true
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion helm/flowforge/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@
"production_mode": {
"type": "boolean"
}
},
}
}
}
},
Expand Down
4 changes: 2 additions & 2 deletions test/customizations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ forge:
apikey: phc_fdlksajfdfadfsafsaf
sentry:
production_mode: false
frontend_dsn: https://sentry.io/flowforge/flowforge-frontend
backend_dsn: https://sentry.io/flowforge/flowforge-backend
frontend_dsn: 'https://sentry.io/flowforge/flowforge-frontend'
backend_dsn: 'https://sentry.io/flowforge/flowforge-backend'
support:
enabled: true
hubspot: 12345678
Expand Down
15 changes: 8 additions & 7 deletions test/unit/configmap_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,17 +108,18 @@ describe('Examine Config Maps', function () {
let yml
beforeEach(function () {
const d = configMaps.filter(doc => doc.metadata.name === 'flowforge-config')[0]
yml = yaml.parse(d.data['customizations.ym'])
yml = yaml.parse(d.data['flowforge.yml'])
})
it('has sentry telemetry', function () {
yml.telemetry.sentry.should.have.property('production_mode')
yml.telemetry.sentry.production_mode.should.equal(false)
console.log(yml.telemetry)
yml.telemetry.frontend.sentry.should.have.property('production_mode')
yml.telemetry.frontend.sentry.production_mode.should.equal(false)

yml.telemetry.sentry.should.have.property('frontend_dsn')
yml.telemetry.sentry.frontend_dsn.should.equal('https://sentry.io/flowforge/flowforge-frontend')
yml.telemetry.frontend.sentry.should.have.property('dsn')
yml.telemetry.frontend.sentry.dsn.should.equal('https://sentry.io/flowforge/flowforge-frontend')

yml.telemetry.sentry.should.have.property('backend_dsn')
yml.telemetry.sentry.frontend_dsn.should.equal('https://sentry.io/flowforge/flowforge-backend')
yml.telemetry.backend.sentry.should.have.property('dsn')
yml.telemetry.backend.sentry.dsn.should.equal('https://sentry.io/flowforge/flowforge-backend')
})
})
})

0 comments on commit 26a6b91

Please sign in to comment.