Skip to content
This repository has been archived by the owner on May 11, 2022. It is now read-only.

Commit

Permalink
using archive file in the github project
Browse files Browse the repository at this point in the history
Signed-off-by: bfitzpat@redhat.com <bfitzpat@redhat.com>
  • Loading branch information
bfitzpat committed Jul 8, 2020
1 parent 81b443d commit a0b1510
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/test/suite/extensionFunctions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,24 +134,23 @@ suite('Extension Functions Test Suite', () => {
});

test('try to copy a zip file and not unzip it with a change to location and filename change', async function() {
const urlToTest = 'https://github.com/apache/camel-k/releases/download/1.0.1/camel-k-examples-1.0.1.tar.gz';
const filepathUri = handleProjectFilePath('camel-k-examples2'); // create a folder to unzip into
const newFilename = `camel-k-examples.tar.gz`;
const urlToTest = 'https://github.com/redhat-developer/vscode-didact/raw/master/test-archive/testarchive.tar.gz';
const filepathUri = handleProjectFilePath('expanded'); // create a folder to unzip into
const newFilename = `giphy.tar.gz`;
if (filepathUri) {
await testCopyFileFromURLtoLocalURI(urlToTest, filepathUri.fsPath, newFilename, false);
}
});

test('try to copy and unzip a file with a change to location and filename change', async function() {
const urlToTest = 'https://github.com/apache/camel-k/releases/download/1.0.1/camel-k-examples-1.0.1.tar.gz';
const filepathUri = handleProjectFilePath('camel-k-examples'); // create a folder to unzip into
const newFilename = `camel-k-examples.tar.gz`;
const fileToLookFor = `README.md`;
const urlToTest = 'https://github.com/redhat-developer/vscode-didact/raw/master/test-archive/testarchive.tar.gz';
const filepathUri = handleProjectFilePath('expanded2'); // create a folder to unzip into
const newFilename = `testarchive.tar.gz`;
const fileToLookFor = `testfile/spongebob-expands.gif`;
if (filepathUri) {
await testCopyFileFromURLtoLocalURI(urlToTest, filepathUri.fsPath, newFilename, true, fileToLookFor);
}
});

});

function checkCanParseDidactUriForPath(urlValue: string, endToCheck: string, alternateEnd : string) {
Expand Down

0 comments on commit a0b1510

Please sign in to comment.