Skip to content

Commit

Permalink
Fix #251 Support the --chmod flag in COPY instructions
Browse files Browse the repository at this point in the history
Signed-off-by: Remy Suen <[email protected]>
  • Loading branch information
rcjsuen committed Jan 20, 2021
1 parent e2a056d commit ddcaa2c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file.
### Added
- textDocument/publishDiagnostics
- support `--chmod` flag in ADD instructions added in Docker CE 20.10 ([#250](https://github.com/rcjsuen/dockerfile-language-server-nodejs/issues/250))
- support `--chmod` flag in COPY instructions added in Docker CE 20.10 ([#251](https://github.com/rcjsuen/dockerfile-language-server-nodejs/issues/251))

## [0.2.2] - 2020-01-07
### Fixed
Expand Down
25 changes: 25 additions & 0 deletions test/server.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1819,6 +1819,31 @@ describe("Dockerfile LSP Tests", function() {
});
});

it("issue #251", function (finished) {
this.timeout(5000);
sendNotification("textDocument/didOpen", {
textDocument: {
languageId: "dockerfile",
version: 1,
uri: "uri://dockerfile/251.txt",
text: "FROM scratch\nCOPY --chmod=644 . ."
}
});

lspProcess.once("message", (json) => {
if (json.method === "textDocument/publishDiagnostics") {
assert.equal(json.params.uri, "uri://dockerfile/251.txt");
assert.equal(json.params.diagnostics.length, 0);
sendNotification("textDocument/didClose", {
textDocument: {
uri: "uri://dockerfile/251.txt"
}
});
finished();
}
});
});

function testInvalidFile(request: string, assertionCallback: Function) {
it(request, function(finished) {
this.timeout(5000);
Expand Down

0 comments on commit ddcaa2c

Please sign in to comment.