Skip to content

Commit

Permalink
Merge branch 'feature/202312_conditionaltools' into feature/202312_co…
Browse files Browse the repository at this point in the history
…nditional_tools

# Conflicts:
#	.github/workflows/starsky-docker-buildx.yml
  • Loading branch information
qdraw committed Dec 11, 2023
2 parents 5300091 + 1d72553 commit f18111d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
15 changes: 10 additions & 5 deletions starsky/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,16 @@ RUN if [ "$TEST" = "true" ]; then \
# docker buildx imagetools inspect mcr.microsoft.com/dotnet/aspnet:6.0
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS release
WORKDIR /app

# for debugging
RUN apt-get update
RUN apt-get install -y curl
RUN apt-get clean
ARG TOOLS=false

# # for debugging
RUN if [ "$TOOLS" = "true" ]; then \
apt-get update ;\
apt-get install --no-install-recommends -y curl ;\
apt-get clean ;\
else \
echo "no tools for debug" ;\
fi

# Create a group and user
RUN groupadd --gid 1000 app \
Expand Down
2 changes: 1 addition & 1 deletion starsky/starskytest/Controllers/DiskControllerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public DiskControllerTest()
_appSettings = serviceProvider.GetRequiredService<AppSettings>();

_scopeFactory = serviceProvider.GetRequiredService<IServiceScopeFactory>();
_query = new Query(_context, new AppSettings(), _scopeFactory, new FakeIWebLogger(), memoryCache);
_query = new Query(_context, _appSettings, _scopeFactory, new FakeIWebLogger(), memoryCache);
}

private async Task<FileIndexItem> InsertSearchData()
Expand Down
4 changes: 2 additions & 2 deletions starsky/starskytest/FakeMocks/FakeIQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public IEnumerable<FileIndexItem> DisplayFileFolders(List<FileIndexItem> fileInd
bool enableCollections = true, bool hideDeleted = true,
SortType? sort = SortType.FileName)
{
if ( _content.All(p => p.FilePath != singleItemDbPath) )
if ( _content.TrueForAll(p => p.FilePath != singleItemDbPath) )
{
return null;
}
Expand Down Expand Up @@ -234,7 +234,7 @@ public async Task<List<FileIndexItem>> RemoveItemAsync(List<FileIndexItem> updat
public bool RemoveCacheParentItem(string directoryName)
{
if ( _fakeCachedContent == null ) return false;
var item = _fakeCachedContent.FirstOrDefault(p =>
var item = _fakeCachedContent.Find(p =>
p.ParentDirectory == directoryName);
if ( item == null ) return false;
_fakeCachedContent.Remove(item);
Expand Down

0 comments on commit f18111d

Please sign in to comment.