Skip to content

Commit

Permalink
version
Browse files Browse the repository at this point in the history
  • Loading branch information
julienmalard committed Feb 17, 2024
1 parent 6abf356 commit 4f7b506
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 15 deletions.
8 changes: 4 additions & 4 deletions .aegir.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,15 @@ const lancerSfipDansNavigateur = async (opts) => {
);

await page.goto(`file://${fichierHtml}`);
console.log("On a navigué à la page")
console.log("On a navigué à la page");
await page.getByText("Test").isVisible();
console.log("La page est prête")
console.log("La page est prête");
} catch (e) {
// On arrête pas les tests pour une petite erreur comme ça
console.error(e);
}
return async () => {
console.log("On ferme le navigateur")
console.log("On ferme le navigateur");
await navigateur.close();
sync(dossierCompilation);
};
Expand All @@ -177,7 +177,7 @@ const options = {
return { fermerNavigateur, serveurLocal, relai };
},
after: async (_, avant) => {
console.log("On ferme aegir")
console.log("On ferme aegir");
await avant.fermerNavigateur();
await avant.serveurLocal?.close();
avant.relai?.kill();
Expand Down
9 changes: 5 additions & 4 deletions src/sfip/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ export const ADRESSES_NŒUDS_RELAI = [
"/ip4/164.90.222.145/tcp/9092/p2p/12D3KooWJ7P1yeoxB5mq3TwQh8YgmVhankjtT4rsVGZPUyf617aR",
];

export const ADRESSES_NŒUDS_RELAI_LOCAL = ["/ip4/127.0.0.1/udp/9090/webrtc-direct/certhash/uEiAWCRG30KUzLUuWYZ9HZNcFBHt8uLjLRB2xlLW_L_8lQg/p2p/12D3KooWKeJNXytogRbQPvYrFxXAaDGaJUfysrPeGbbEBDM78iTu",
"/ip4/127.0.0.1/udp/9091/quic-v1/p2p/12D3KooWKeJNXytogRbQPvYrFxXAaDGaJUfysrPeGbbEBDM78iTu",
"/ip4/127.0.0.1/tcp/9092/p2p/12D3KooWKeJNXytogRbQPvYrFxXAaDGaJUfysrPeGbbEBDM78iTu"];

export const ADRESSES_NŒUDS_RELAI_LOCAL = [
"/ip4/127.0.0.1/udp/9090/webrtc-direct/certhash/uEiAWCRG30KUzLUuWYZ9HZNcFBHt8uLjLRB2xlLW_L_8lQg/p2p/12D3KooWKeJNXytogRbQPvYrFxXAaDGaJUfysrPeGbbEBDM78iTu",
"/ip4/127.0.0.1/udp/9091/quic-v1/p2p/12D3KooWKeJNXytogRbQPvYrFxXAaDGaJUfysrPeGbbEBDM78iTu",
"/ip4/127.0.0.1/tcp/9092/p2p/12D3KooWKeJNXytogRbQPvYrFxXAaDGaJUfysrPeGbbEBDM78iTu",
];
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// Generated by genversion.
export const version = '1.0.0';
export const version = "1.0.0";
10 changes: 5 additions & 5 deletions test/sfip.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ describe.only("SFIP", function () {
});

after(async () => {
console.log("après test")
console.log("après test");
await sfip.stop();
console.log("après fermeture sfip")
console.log("après fermeture sfip");
try {
fEffacer?.();
console.log("dossier effacé")
console.log("dossier effacé");
} catch (e) {
if (!(isNode || isElectronMain) || !(process.platform === "win32")) {
throw e
throw e;
}
}
console.log("fini après test")
console.log("fini après test");
});

it("Initialiser", async () => {
Expand Down
5 changes: 4 additions & 1 deletion test/utils/lancerNœud.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { initSFIP } from "@/sfip/index.js";
console.log("on est ici");
initSFIP("./testSfip").then(async (sfip) => {
console.log("SFIP initialisé avec id de nœud :", sfip.libp2p.peerId.toString());
console.log(
"SFIP initialisé avec id de nœud :",
sfip.libp2p.peerId.toString(),
);
sfip.libp2p.addEventListener("peer:discovery", async () => {
const pairs = sfip.libp2p.getPeers();
console.log(
Expand Down

0 comments on commit 4f7b506

Please sign in to comment.