Skip to content

Commit

Permalink
style: apply linters automatic fixes (#1429)
Browse files Browse the repository at this point in the history
Signed-off-by: Hyperledger Bot <[email protected]>
Co-authored-by: Hyperledger Bot <[email protected]>
  • Loading branch information
2 people authored and amagyar-iohk committed Oct 31, 2024
1 parent 0781e3b commit df7b03f
Show file tree
Hide file tree
Showing 8 changed files with 190,425 additions and 186,448 deletions.
12 changes: 6 additions & 6 deletions tests/didcomm-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ You can start by `cd docker` and running `./run.sh <cloud-agent-version>` script

### Environment variables

| variable | description | default |
| ---------------- | ----------------------------------- | ----------------------------------- |
| CLOUD_AGENT_URL | Url for cloud-agent | http://localhost:8090 |
| MEDIATOR_OOB_URL | Url for mediator oob invitation | http://localhost:8080/invitationOOB |
| WEBHOOK_PORT | Port for the local server listen to | 3000 |
| WEBHOOK_URL | Url for webhook url | http://host.docker.internal:3000 |
| variable | description | default |
|------------------|-------------------------------------|---------------------------------------|
| CLOUD_AGENT_URL | Url for cloud-agent | <http://localhost:8090> |
| MEDIATOR_OOB_URL | Url for mediator oob invitation | <http://localhost:8080/invitationOOB> |
| WEBHOOK_PORT | Port for the local server listen to | 3000 |
| WEBHOOK_URL | Url for webhook url | <http://host.docker.internal:3000> |

### Running tests

Expand Down
376,786 changes: 190,383 additions & 186,403 deletions tests/didcomm-tests/dist/suite.spec.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/didcomm-tests/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ services:

prism-agent:
container_name: didcomm-stack
image: ghcr.io/hyperledger/identus-cloud-agent:${CLOUD_AGENT_VERSION}
image: ghcr.io/hyperledger/identus-cloud-agent:${CLOUD_AGENT_VERSION}
ports:
- "8080:8080"
- "8090:8090"
Expand Down
36 changes: 18 additions & 18 deletions tests/didcomm-tests/docker/initdb.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
db.createUser({
user: "admin",
pwd: "admin",
roles: [
{ role: "readWrite", db: "mediator" }
]
});
user: 'admin',
pwd: 'admin',
roles: [
{ role: 'readWrite', db: 'mediator' }
]
})

const database = 'mediator';
const collectionDidAccount = 'user.account';
const collectionMessages = 'messages';
const collectionMessagesSend = 'messages.outbound';
const database = 'mediator'
const collectionDidAccount = 'user.account'
const collectionMessages = 'messages'
const collectionMessagesSend = 'messages.outbound'

// The current database to use.
use(database);
use(database)

// Create collections.
db.createCollection(collectionDidAccount);
db.createCollection(collectionMessages);
db.createCollection(collectionMessagesSend);
db.createCollection(collectionDidAccount)
db.createCollection(collectionMessages)
db.createCollection(collectionMessagesSend)

//create index
db.getCollection(collectionDidAccount).createIndex({ 'did': 1 }, { unique: true });
// create index
db.getCollection(collectionDidAccount).createIndex({ did: 1 }, { unique: true })
// Only enforce uniqueness on non-empty arrays
db.getCollection(collectionDidAccount).createIndex({ 'alias': 1 }, { unique: true, partialFilterExpression: { "alias.0": { $exists: true } } });
db.getCollection(collectionDidAccount).createIndex({ "messagesRef.hash": 1, "messagesRef.recipient": 1 });
db.getCollection(collectionDidAccount).createIndex({ alias: 1 }, { unique: true, partialFilterExpression: { 'alias.0': { $exists: true } } })
db.getCollection(collectionDidAccount).createIndex({ 'messagesRef.hash': 1, 'messagesRef.recipient': 1 })
8 changes: 4 additions & 4 deletions tests/didcomm-tests/docker/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e
CLOUD_AGENT_VERSION=$1

PORT="$PRISM_PORT" \
CLOUD_AGENT_VERSION="$CLOUD_AGENT_VERSION" \
docker compose \
-f "docker/docker-compose.yml" \
up -d --wait
CLOUD_AGENT_VERSION="$CLOUD_AGENT_VERSION" \
docker compose \
-f "docker/docker-compose.yml" \
up -d --wait
6 changes: 3 additions & 3 deletions tests/didcomm-tests/docker/stop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
set -e

CLOUD_AGENT_VERSION="$CLOUD_AGENT_VERSION" \
docker compose \
-f "./docker/docker-compose.yml" \
down -v
docker compose \
-f "./docker/docker-compose.yml" \
down -v
16 changes: 8 additions & 8 deletions tests/didcomm-tests/esbuild.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
const { build } = require("esbuild");
const { build } = require('esbuild')

build({
entryPoints: ["test-suite.ts"],
bundle: true,
minify: false,
platform: 'node',
target: ['esnext'],
format: 'cjs',
outfile: "dist/suite.spec.js",
entryPoints: ['test-suite.ts'],
bundle: true,
minify: false,
platform: 'node',
target: ['esnext'],
format: 'cjs',
outfile: 'dist/suite.spec.js'
})
7 changes: 2 additions & 5 deletions tests/didcomm-tests/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,14 @@
"compilerOptions": {
"target": "ESNext",
"lib": ["ESNext"],
"module": "CommonJS",
"module": "CommonJS"
// "moduleResolution": "node",
// "emitDecoratorMetadata": true,
// "esModuleInterop": true,
// "experimentalDecorators": true,
// "sourceMap": true,
// "declaration": false
},
"include": [
"src/**/*.ts",
"test/**/*.ts"
],
"include": ["src/**/*.ts", "test/**/*.ts"],
"exclude": ["node_modules"]
}

0 comments on commit df7b03f

Please sign in to comment.