-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #124 from CafIncubator/develop
Merge 0.2-dev.10 to main
- Loading branch information
Showing
116 changed files
with
2,374 additions
and
721 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Assets/CliConfigurationSecrets | ||
Assets/CliConfigurationSecrets/* |
6 changes: 6 additions & 0 deletions
6
Caf.Midden.Cli.Tests/Assets/MockDataStoreLocal/Production/DESCRIPTION.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
project: "ProductionProject" | ||
--- | ||
# Production Title | ||
|
||
Some text and stuff |
6 changes: 6 additions & 0 deletions
6
Caf.Midden.Cli.Tests/Assets/MockDataStoreLocal/Raw/DESCRIPTION.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
project: "RawProject" | ||
--- | ||
# Raw Title | ||
|
||
Some text and stuff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
using Caf.Midden.Cli.Models; | ||
using Caf.Midden.Cli.Services; | ||
using Caf.Midden.Core.Services; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Xunit; | ||
|
||
namespace Caf.Midden.Cli.Tests | ||
{ | ||
public class CrawlerIntegrationTests | ||
{ | ||
// NOTE: These tests require configuration files that are not included in the repository. These need to be generated for each clone. | ||
[Fact] | ||
public void GetProjects_Local() | ||
{ | ||
string configPath = "Assets/CliConfigurationSecrets/LocalFileSystemProjectTest.json"; | ||
if(!File.Exists(configPath)) | ||
throw new FileNotFoundException(configPath); | ||
|
||
// Gets config file, fails if not exist | ||
ConfigurationService configService = new ConfigurationService(); | ||
CliConfiguration config = configService.GetConfiguration(configPath); | ||
|
||
DataStore dataStore = config.DataStores[0]; | ||
LocalFileSystemCrawler sut = new LocalFileSystemCrawler( | ||
dataStore.Path); | ||
|
||
List<Core.Models.v0_2.Project> actual = sut.GetProjects(new ProjectReader( | ||
new ProjectParser())); | ||
|
||
Assert.NotNull(actual); | ||
Assert.Single(actual); | ||
Assert.Equal("ProductionProject", actual[0].Name); | ||
} | ||
|
||
[Fact] | ||
public void GetProjects_AzureDataLake() | ||
{ | ||
string configPath = "Assets/CliConfigurationSecrets/AzureDataLakeProjectTest.json"; | ||
if (!File.Exists(configPath)) | ||
throw new FileNotFoundException(configPath); | ||
|
||
// Gets config file, fails if not exist | ||
ConfigurationService configService = new ConfigurationService(); | ||
CliConfiguration config = configService.GetConfiguration(configPath); | ||
|
||
DataStore dataStore = config.DataStores[0]; | ||
AzureDataLakeCrawler sut = new AzureDataLakeCrawler( | ||
dataStore.AccountName, | ||
dataStore.TenantId, | ||
dataStore.ClientId, | ||
dataStore.ClientSecret, | ||
dataStore.AzureFileSystemName); | ||
|
||
List<Core.Models.v0_2.Project> actual = sut.GetProjects(new ProjectReader( | ||
new ProjectParser())); | ||
|
||
Assert.NotNull(actual); | ||
Assert.Single(actual); | ||
Assert.Equal("TestProject", actual[0].Name); | ||
} | ||
|
||
[Fact] | ||
public void GetProjects_GoogleWorkspaceSharedDrive() | ||
{ | ||
string configPath = "Assets/CliConfigurationSecrets/GoogleWorkspaceSharedDriveProjectTest.json"; | ||
if (!File.Exists(configPath)) | ||
throw new FileNotFoundException(configPath); | ||
|
||
// Gets config file, fails if not exist | ||
ConfigurationService configService = new ConfigurationService(); | ||
CliConfiguration config = configService.GetConfiguration(configPath); | ||
|
||
DataStore dataStore = config.DataStores[0]; | ||
GoogleWorkspaceSharedDriveCrawler sut = new GoogleWorkspaceSharedDriveCrawler( | ||
dataStore.ClientId, | ||
dataStore.ClientSecret, | ||
dataStore.ApplicationName); | ||
|
||
List<Core.Models.v0_2.Project> actual = sut.GetProjects(new ProjectReader( | ||
new ProjectParser())); | ||
|
||
Assert.NotNull(actual); | ||
Assert.True(actual.Count() > 0); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
dotnet publish -c Release -o Publish/linux-x64 -p:PublishReadyToRun=false -p:PublishSingleFile=true --self-contained true -p:IncludeNativeLibrariesForSelfExtract=true -r linux-x64 /p:DebugType=None /p:DebugSymbols=false | ||
dotnet publish -c Release -o Publish/linux-x64 -p:PublishReadyToRun=false -p:PublishSingleFile=true -p:UseAppHost=true --self-contained true -p:IncludeNativeLibrariesForSelfExtract=true -r linux-x64 /p:DebugType=None /p:DebugSymbols=false | ||
|
||
dotnet publish -c Release -o Publish/win-x64 -p:PublishReadyToRun=true -p:PublishSingleFile=true --self-contained true -p:IncludeNativeLibrariesForSelfExtract=true -r win-x64 /p:DebugType=None /p:DebugSymbols=false | ||
dotnet publish -c Release -o Publish/win-x64 -p:PublishReadyToRun=true -p:PublishSingleFile=true -p:UseAppHost=true --self-contained true -p:IncludeNativeLibrariesForSelfExtract=true -r win-x64 /p:DebugType=None /p:DebugSymbols=false | ||
|
||
dotnet publish -c Release -o Publish/osx.10.11-x64 -p:PublishReadyToRun=false -p:PublishSingleFile=true --self-contained true -p:IncludeNativeLibrariesForSelfExtract=true -r osx.10.13-x64 /p:DebugType=None /p:DebugSymbols=false | ||
dotnet publish -c Release -o Publish/osx.10.11-x64 -p:PublishReadyToRun=false -p:PublishSingleFile=true -p:UseAppHost=true --self-contained true -p:IncludeNativeLibrariesForSelfExtract=true -r osx.10.13-x64 /p:DebugType=None /p:DebugSymbols=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.