-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add basedownloadcontroller unit tests #375
Conversation
lib/MockDownloadController.js
Outdated
|
||
module.exports = class MockDownloadController extends BaseDownloadController { | ||
constructor(eventData, kubeData) { | ||
let params = {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let params = {}; | |
const params = {}; |
lib/MockKubeResourceMeta.js
Outdated
const res = await this.kubeGetResource(ref); | ||
return res; | ||
try { | ||
let uri = JSON.parse(reqOpt.uri); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let uri = JSON.parse(reqOpt.uri); | |
const uri = JSON.parse(reqOpt.uri); |
const clone = require('clone'); | ||
const objectPath = require('object-path'); | ||
|
||
let kubeData = {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let kubeData = {}; | |
const kubeData = {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gets reset in afterEach, so can't change to const
test/basedownloadcontroller-tests.js
Outdated
let eventDataUpdate = clone(kubeData['RemoteResource'][0]); | ||
eventDataUpdate = { | ||
object: eventDataUpdate | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let eventDataUpdate = clone(kubeData['RemoteResource'][0]); | |
eventDataUpdate = { | |
object: eventDataUpdate | |
}; | |
const eventDataUpdate = { | |
object: clone(kubeData['RemoteResource'][0]) | |
}; |
test/basedownloadcontroller-tests.js
Outdated
let eventDataUpdate = clone(kubeData['RemoteResource'][0]); | ||
eventDataUpdate = { | ||
object: eventDataUpdate | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let eventDataUpdate = clone(kubeData['RemoteResource'][0]); | |
eventDataUpdate = { | |
object: eventDataUpdate | |
}; | |
const eventDataUpdate = { | |
object: clone(kubeData['RemoteResource'][0]) | |
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it overall. Minor suggestions.
No description provided.