-
Notifications
You must be signed in to change notification settings - Fork 113
Conversation
Codecov Report
@@ Coverage Diff @@
## master #515 +/- ##
=======================================
Coverage 99.61% 99.61%
=======================================
Files 22 22
Lines 11861 11949 +88
=======================================
+ Hits 11815 11903 +88
Misses 46 46
Continue to review full report at Codecov.
|
Thank you very much! The only thing we need to merge is a system test to confirm it works when run against the real backend. Would you be willing to add those to "system-test/compute.js"? You'd have to test against your own project, then you can run them with Specifically, you would probably add a new "describe" block to the file, and add something like: // using "describe.only" will only run these new tests when you test with `npm run system-test`
// (you don't want to create a bunch of extra resources that the rest of our test blocks do)
describe.only('labels', () => {
it('should get labels', async () => {
const [labels] = await vm.getLabels();
assert(labels.length > 0);
});
it('should set labels', async () => {
const [operation] = await vm.setLabels({myLabel: true});
await operation.promise();
const [labels] = await vm.getLabels();
assert.strictEqual(labels.myLabel, true);
});
}); No worries if not, just let me know! Thanks again for helping out 👍🏻 |
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.
Perfect! Just need system tests before we can merge.
System tests added. Instead of adding a new describe block, I placed it in the existing vm block, so we don't need to spin up a new VM just for this. Note that the setLabels method requires explicitly passing in the label fingerprint. IMHO this is a little unintuitive, but it parallels the underlying API and the existing setTags method as well. |
Looks perfect, thank you! |
feat: add VM.get/setLabels() methods
Implemented using VM.get/setTags() as a template.
Fixes #116