Compare commits
1 Commits
fix/base-i
...
ci/pnpm-ca
| Author | SHA1 | Date | |
|---|---|---|---|
| fcfac28978 |
@@ -1,27 +0,0 @@
|
|||||||
when:
|
|
||||||
- event: manual
|
|
||||||
- event: cron
|
|
||||||
cron: weekly-base-image
|
|
||||||
|
|
||||||
variables:
|
|
||||||
- &kaniko_setup |
|
|
||||||
mkdir -p /kaniko/.docker
|
|
||||||
echo "{\"auths\":{\"git.mosaicstack.dev\":{\"username\":\"$GITEA_USER\",\"password\":\"$GITEA_TOKEN\"}}}" > /kaniko/.docker/config.json
|
|
||||||
|
|
||||||
steps:
|
|
||||||
build-base:
|
|
||||||
image: gcr.io/kaniko-project/executor:debug
|
|
||||||
environment:
|
|
||||||
GITEA_USER:
|
|
||||||
from_secret: gitea_username
|
|
||||||
GITEA_TOKEN:
|
|
||||||
from_secret: gitea_token
|
|
||||||
commands:
|
|
||||||
- *kaniko_setup
|
|
||||||
- /kaniko/executor
|
|
||||||
--context .
|
|
||||||
--dockerfile docker/base.Dockerfile
|
|
||||||
--destination git.mosaicstack.dev/mosaic/node-base:24-slim
|
|
||||||
--destination git.mosaicstack.dev/mosaic/node-base:latest
|
|
||||||
--cache=true
|
|
||||||
--cache-repo git.mosaicstack.dev/mosaic/node-base/cache
|
|
||||||
@@ -384,18 +384,10 @@ describe("ActivityLoggingInterceptor", () => {
|
|||||||
const context = createMockExecutionContext("POST", {}, body, user);
|
const context = createMockExecutionContext("POST", {}, body, user);
|
||||||
const next = createMockCallHandler(result);
|
const next = createMockCallHandler(result);
|
||||||
|
|
||||||
mockActivityService.logActivity.mockResolvedValue({
|
|
||||||
id: "activity-123",
|
|
||||||
});
|
|
||||||
|
|
||||||
await new Promise<void>((resolve) => {
|
await new Promise<void>((resolve) => {
|
||||||
interceptor.intercept(context, next).subscribe(() => {
|
interceptor.intercept(context, next).subscribe(() => {
|
||||||
// workspaceId is now optional, so logActivity should be called without it
|
// Should not call logActivity when workspaceId is missing
|
||||||
expect(mockActivityService.logActivity).toHaveBeenCalled();
|
expect(mockActivityService.logActivity).not.toHaveBeenCalled();
|
||||||
const callArgs = mockActivityService.logActivity.mock.calls[0][0];
|
|
||||||
expect(callArgs.userId).toBe("user-123");
|
|
||||||
expect(callArgs.entityId).toBe("task-123");
|
|
||||||
expect(callArgs.workspaceId).toBeUndefined();
|
|
||||||
resolve();
|
resolve();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -420,18 +412,10 @@ describe("ActivityLoggingInterceptor", () => {
|
|||||||
const context = createMockExecutionContext("POST", {}, body, user);
|
const context = createMockExecutionContext("POST", {}, body, user);
|
||||||
const next = createMockCallHandler(result);
|
const next = createMockCallHandler(result);
|
||||||
|
|
||||||
mockActivityService.logActivity.mockResolvedValue({
|
|
||||||
id: "activity-123",
|
|
||||||
});
|
|
||||||
|
|
||||||
await new Promise<void>((resolve) => {
|
await new Promise<void>((resolve) => {
|
||||||
interceptor.intercept(context, next).subscribe(() => {
|
interceptor.intercept(context, next).subscribe(() => {
|
||||||
// workspaceId is now optional, so logActivity should be called without it
|
// Should not call logActivity when workspaceId is missing
|
||||||
expect(mockActivityService.logActivity).toHaveBeenCalled();
|
expect(mockActivityService.logActivity).not.toHaveBeenCalled();
|
||||||
const callArgs = mockActivityService.logActivity.mock.calls[0][0];
|
|
||||||
expect(callArgs.userId).toBe("user-123");
|
|
||||||
expect(callArgs.entityId).toBe("task-123");
|
|
||||||
expect(callArgs.workspaceId).toBeUndefined();
|
|
||||||
resolve();
|
resolve();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user