Skip to content

Commit

Permalink
test(fabric): update AIO image tags to 1.0.0-rc.2 to lower flakes #1537
Browse files Browse the repository at this point in the history
1. Published the 1.0.0-rc.2 container images for Fabric AIO (out of
band with regards to this pull request, e.g. you don't see anything
for that in the diff)
2. Updated the test ledger class to use the 1.0.0-rc.2 version by default
3. Removed the explicit tags from the test cases so that they all default
to whatever the test ledger is using which should keep things simpler
in the future because the regression we are having right now with someone
pushing a test that uses an old, flaky tag will not happen by default,
so overall this change should increase future stability while also fixing
the problem at hand that the issue was originally created for.

Fixes #1537

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
  • Loading branch information
petermetz committed Nov 15, 2021
1 parent d01d72d commit 0281241
Show file tree
Hide file tree
Showing 18 changed files with 1 addition and 73 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ export class CarbonAccountingAppDummyInfrastructure {
this.fabric = new FabricTestLedgerV1({
publishAllPorts: true,
imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one",
imageVersion: "2021-09-02--fix-876-supervisord-retries",
envVars: new Map([["FABRIC_VERSION", "2.2.0"]]),
logLevel: this.options.logLevel || "INFO",
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ export class SupplyChainAppDummyInfrastructure {
this.fabric = new FabricTestLedgerV1({
publishAllPorts: true,
imageName: "ghcr.io/hyperledger/cactus-fabric-all-in-one",
imageVersion: "2021-09-02--fix-876-supervisord-retries",
logLevel: level,
emitContainerLogs: true,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,7 @@ test.skip(testCase, async (t: Test) => {
emitContainerLogs: true,
logLevel,
publishAllPorts: true,
// imageName: "faio14x",
// imageVersion: "latest",
imageName: "ghcr.io/hyperledger/cactus-fabric-all-in-one",
imageVersion: "2021-09-02--fix-876-supervisord-retries",
});

const tearDown = async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ test.skip(testCase, async (t: Test) => {
emitContainerLogs: true,
logLevel,
imageName: "ghcr.io/hyperledger/cactus-fabric-all-in-one",
imageVersion: "2021-09-02--fix-876-supervisord-retries",
envVars: new Map([
["FABRIC_VERSION", "1.4.8"],
["CA_VERSION", "1.4.9"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,7 @@ test.skip(testCase, async (t: Test) => {
emitContainerLogs: true,
publishAllPorts: true,
logLevel: "debug",
// imageName: "rafaelapb/cactus-fabric2-all-in-one"
// imageVersion: "faio-cb-test",
//
imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one",
imageVersion: "2021-08-19--1084--add-org-x",
envVars: new Map([["FABRIC_VERSION", "2.2.0"]]),
extraOrgs: [extraOrg],
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ test(testCase, async (t: Test) => {
emitContainerLogs: true,
publishAllPorts: true,
imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one",
imageVersion: "2021-09-02--fix-876-supervisord-retries",
envVars: new Map([["FABRIC_VERSION", "2.2.0"]]),
logLevel,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,7 @@ test(testCase, async (t: Test) => {
const ledger = new FabricTestLedgerV1({
emitContainerLogs: true,
publishAllPorts: true,
// imageName: "faio2x",
// imageVersion: "latest",
imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one",
imageVersion: "2021-09-02--fix-876-supervisord-retries",
envVars: new Map([["FABRIC_VERSION", "2.2.0"]]),
logLevel,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,7 @@ test.skip(testCase, async (t: Test) => {
const ledger = new FabricTestLedgerV1({
emitContainerLogs: true,
publishAllPorts: true,
// imageName: "faio2x",
// imageVersion: "latest",
imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one",
imageVersion: "2021-09-02--fix-876-supervisord-retries",
envVars: new Map([["FABRIC_VERSION", "2.2.0"]]),
logLevel,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,7 @@ test(testCase, async (t: Test) => {
const ledger = new FabricTestLedgerV1({
emitContainerLogs: true,
publishAllPorts: true,
// imageName: "faio2x",
// imageVersion: "latest",
imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one",
imageVersion: "2021-09-02--fix-876-supervisord-retries",
envVars: new Map([["FABRIC_VERSION", "2.2.0"]]),
logLevel,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,7 @@ test(testCase, async (t: Test) => {
const ledger = new FabricTestLedgerV1({
emitContainerLogs: true,
publishAllPorts: true,
// imageName: "faio2x",
// imageVersion: "latest",
imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one",
imageVersion: "2021-04-20-nodejs",
envVars: new Map([["FABRIC_VERSION", "2.2.0"]]),
logLevel,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ test.skip(testCase, async (t: Test) => {
const ledger = new FabricTestLedgerV1({
emitContainerLogs: true,
publishAllPorts: true,
// imageName: "faio2x",
// imageVersion: "latest",
imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one",
imageVersion: "2021-08-19--1084--add-org-x",
envVars: new Map([["FABRIC_VERSION", "2.2.0"]]),
});
const tearDown = async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ test(testCase, async (t: Test) => {
publishAllPorts: true,
logLevel,
imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one",
imageVersion: "2021-09-02--fix-876-supervisord-retries",
envVars: new Map([
["FABRIC_VERSION", "2.2.0"],
["CA_VERSION", "1.4.9"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ test("run-transaction-with-identities", async (t: Test) => {
emitContainerLogs: true,
publishAllPorts: true,
imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one",
imageVersion: "2021-09-02--fix-876-supervisord-retries",
envVars: new Map([["FABRIC_VERSION", "2.2.0"]]),
logLevel,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ test("run-transaction-with-ws-ids", async (t: Test) => {
emitContainerLogs: true,
publishAllPorts: true,
imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one",
imageVersion: "2021-09-02--fix-876-supervisord-retries",
envVars: new Map([["FABRIC_VERSION", "2.2.0"]]),
logLevel,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import express from "express";
import bodyParser from "body-parser";
import {
Containers,
// FabricTestLedgerV1,
pruneDockerAllIfGithubAction,
} from "@hyperledger/cactus-test-tooling";
import {
Expand All @@ -20,7 +19,6 @@ import {
DefaultEventHandlerStrategy,
PluginLedgerConnectorFabric,
DeployContractGoSourceV1Request,
// ConnectionProfile,
} from "../../../../main/typescript/public-api";

import { HELLO_WORLD_CONTRACT_GO_SOURCE } from "../../fixtures/go/hello-world-contract-fabric-v14/hello-world-contract-go-source";
Expand All @@ -30,7 +28,6 @@ import { DefaultApi as FabricApi } from "../../../../main/typescript/public-api"
import { IPluginLedgerConnectorFabricOptions } from "../../../../main/typescript/plugin-ledger-connector-fabric";

import { DiscoveryOptions } from "fabric-network";
// import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory";
import { Configuration } from "@hyperledger/cactus-core-api";

import { installOpenapiValidationMiddleware } from "@hyperledger/cactus-core";
Expand All @@ -49,44 +46,6 @@ test(testCase, async (t: Test) => {
test.onFailure(async () => {
await Containers.logDiagnostics({ logLevel });
});
// const ledger = new FabricTestLedgerV1({
// emitContainerLogs: true,
// logLevel,
// publishAllPorts: true,
// imageName: "ghcr.io/hyperledger/cactus-fabric-all-in-one",
// imageVersion: "2021-09-02--fix-876-supervisord-retries",
// });

// const tearDown = async () => {
// await ledger.stop();
// await ledger.destroy();
// };

// test.onFinish(tearDown);

// await ledger.start();
// const connectionProfile = await ledger.getConnectionProfileOrg1();
// const enrollAdminOut = await ledger.enrollAdmin();
// const adminWallet = enrollAdminOut[1];
// const [userIdentity] = await ledger.enrollUser(adminWallet);
// const sshConfig = await ledger.getSshConfig();

// const keychainInstanceId = uuidv4();
// const keychainId = uuidv4();
// const keychainEntryKey = "user2";
// const keychainEntryValue = JSON.stringify(userIdentity);

// const keychainPlugin = new PluginKeychainMemory({
// instanceId: keychainInstanceId,
// keychainId,
// logLevel,
// backend: new Map([
// [keychainEntryKey, keychainEntryValue],
// ["some-other-entry-key", "some-other-entry-value"],
// ]),
// });

// const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] });

const discoveryOptions: DiscoveryOptions = {
enabled: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ test(testCase, async (t: Test) => {
emitContainerLogs: true,
publishAllPorts: true,
imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one",
imageVersion: "2021-09-02--fix-876-supervisord-retries",
envVars: new Map([["FABRIC_VERSION", "2.2.0"]]),
logLevel,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ test("BEFORE " + testCase, async (t: Test) => {
emitContainerLogs: true,
publishAllPorts: true,
imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one",
imageVersion: "2021-04-20-nodejs",
envVars: new Map([["FABRIC_VERSION", "2.2.0"]]),
logLevel,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export interface LedgerStartOptions {
*/
const DEFAULT_OPTS = Object.freeze({
imageName: "ghcr.io/hyperledger/cactus-fabric-all-in-one",
imageVersion: "2021-09-02--fix-876-supervisord-retries",
imageVersion: "v1.0.0-rc.2",
envVars: new Map([["FABRIC_VERSION", "1.4.8"]]),
stateDatabase: STATE_DATABASE.COUCH_DB,
orgList: ["org1", "org2"],
Expand Down

0 comments on commit 0281241

Please sign in to comment.