Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ jobs:
- name: Setup Foundry
uses: foundry-rs/foundry-toolchain@82dee4ba654bd2146511f85f0d013af94670c4de # v1

- name: Install Node Gyp
run: bun install -g node-gyp
Comment on lines +67 to +68
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (bug_risk): Using bun install -g for global installation may not work

Bun does not handle the -g flag like npm. Use npm install -g node-gyp or add node-gyp as a devDependency and run bun install instead.

Suggested change
- name: Install Node Gyp
run: bun install -g node-gyp
- name: Install Node Gyp
run: npm install -g node-gyp


- name: Install Bun dependencies
run: bun install

Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"biome.requireConfigFile": true,
"editor.codeActionsOnSave": {
"quickfix.biome": "explicit",
"source.organizeImports": "never",
"source.organizeImports": "always",
"source.organizeImports.biome": "explicit",
"source.removeUnusedImports": "always"
},
Expand Down
4 changes: 2 additions & 2 deletions sdk/ipfs/src/helpers/client-options.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ApplicationAccessTokenSchema, UrlSchema } from "@settlemint/sdk-utils/v
import { z } from "zod/v4";

/**
* Schema for validating client options for the Portal client.
* Schema for validating client options for the IPFS client.
*/
export const ClientOptionsSchema = z.object({
/** The URL of the IPFS instance to connect to */
Expand All @@ -15,7 +15,7 @@ export const ClientOptionsSchema = z.object({
export type ClientOptions = z.infer<typeof ClientOptionsSchema>;

/**
* Schema for validating server client options for the Portal client.
* Schema for validating server client options for the IPFS client.
* Extends the ClientOptionsSchema with additional server-specific fields.
*/
export const ServerClientOptionsSchema = ClientOptionsSchema.extend({
Expand Down
6 changes: 6 additions & 0 deletions test/restart-resources.e2e.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { afterEach, describe, expect, setDefaultTimeout, test } from "bun:test";
import { loadEnv } from "@settlemint/sdk-utils/environment";
import { fetchWithRetry } from "@settlemint/sdk-utils/http";
import { PORTAL_NAME } from "./constants/test-resources";
import { forceExitAllCommands, runCommand } from "./utils/run-command";

Expand All @@ -22,5 +24,9 @@ describe("Restart platform resources using the SDK", () => {
"--accept-defaults",
]).result;
expect(output).toInclude(`Middleware ${PORTAL_NAME} restart initiated successfully`);
// Make sure it is running
const env = await loadEnv(false, false);
const response = await fetchWithRetry(env.SETTLEMINT_PORTAL_REST_ENDPOINT ?? "");
expect(response.status).toBe(401); // Unauthorized as we did not provide a token
});
});