All files / blong-int-adapter server.ts

100% Statements 76/76
100% Branches 1/1
100% Functions 0/0
100% Lines 76/76

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 771x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x  
import {server} from '@feasibleone/blong';
 
/**
 * blong-int-adapter: Integration tests for all blong-gogo adapter types.
 *
 * Each adapter realm is opt-in via a dedicated config name passed through
 * the BLONG_ENV environment variable (e.g. BLONG_ENV=adapter.mysql).
 * This prevents all realms from activating together and requiring all
 * backends simultaneously.
 */
export default server(blong => ({
    url: import.meta.url,
    validation: blong.type.Object({}),
    children: [
        './mysql',
        './mongodb',
        './http',
        './s3',
        './kafka',
        './vault',
        './keycloak',
        './k8s',
        './slack',
        './github',
    ],
    config: {
        default: {
            rpcServer: {port: 0},
            gateway: {port: 0},
        },
        microservice: {},
        'adapter.mysql': {
            mysql: {},
            watch: {test: ['test.mysql.query', 'test.mysql.crud', 'test.mysql.schema']},
        },
        'adapter.mongodb': {
            mongodb: {},
            watch: {test: ['test.mongodb.documentInsert', 'test.mongodb.crud']},
        },
        'adapter.http': {
            http: {},
            watch: {test: ['test.http.echoGet']},
        },
        'adapter.s3': {
            s3: {},
            watch: {test: ['test.s3.objectPut', 'test.s3.objectCrud']},
        },
        'adapter.kafka': {
            kafka: {},
            watch: {test: ['test.kafka.messageProduce', 'test.kafka.messageRoundtrip']},
        },
        'adapter.vault': {
            vault: {},
            watch: {
                test: ['test.vault.secretPut', 'test.vault.secretCrud', 'test.vault.secretHealth'],
            },
        },
        'adapter.keycloak': {
            keycloak: {},
            watch: {
                test: [
                    'test.keycloak.realmFind',
                    'test.keycloak.realmCrud',
                    'test.keycloak.userCrud',
                    'test.keycloak.groupCrud',
                    'test.keycloak.roleCrud',
                    'test.keycloak.clientCrud',
                ],
            },
        },
        'adapter.k8s': {
            k8s: {},
            watch: {test: ['test.k8s.namespaceFind']},
        },
    },
}));