• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

safe-global / safe-client-gateway / 6228254389

18 Sep 2023 09:32PM UTC coverage: 92.077% (-0.02%) from 92.093%
6228254389

Pull #697

github

web-flow
build(deps): bump docker/build-push-action from 4 to 5

Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4 to 5.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Pull Request #697: build(deps): bump docker/build-push-action from 4 to 5

1192 of 1418 branches covered (0.0%)

Branch coverage included in aggregate %.

4561 of 4830 relevant lines covered (94.43%)

150.85 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/routes/data-decode/__tests__/data-decode.e2e-spec.ts
1
import { faker } from '@faker-js/faker';
×
2
import { INestApplication } from '@nestjs/common';
3
import { Test } from '@nestjs/testing';
×
4
import { RedisClientType } from 'redis';
5
import * as request from 'supertest';
×
6
import { AppModule } from '@/app.module';
×
7
import { TestAppProvider } from '@/__tests__/test-app.provider';
×
8
import { DataDecoded } from '@/domain/data-decoder/entities/data-decoded.entity';
9
import { redisClientFactory } from '@/__tests__/redis-client.factory';
×
10
import { getDataDecodedDtoBuilder } from '../entities/__tests__/get-data-decoded.dto.builder';
×
11

12
describe('Data decode e2e tests', () => {
×
13
  let app: INestApplication;
14
  let redisClient: RedisClientType;
15
  const chainId = '5'; // Görli testnet
×
16

17
  beforeAll(async () => {
×
18
    const moduleRef = await Test.createTestingModule({
×
19
      imports: [AppModule],
20
    }).compile();
21

22
    app = await new TestAppProvider().provide(moduleRef);
×
23
    await app.init();
×
24
    redisClient = await redisClientFactory();
×
25
  });
26

27
  beforeEach(async () => {
×
28
    await redisClient.flushAll();
×
29
  });
30

31
  it('POST /data-decoder', async () => {
×
32
    const getDataDecodedDto = getDataDecodedDtoBuilder()
×
33
      .with(
34
        'data',
35
        '0x8d80ff0a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004a60031369c6ecb549c117aff789ad66c708a452296740000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000000000000000ccd7c90b85e48682a68e7db1dc1f0339ea46ab020000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000000000000000c20aef7964d6c3c966e3ae9e850aee9db81792e30000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000000000000000000000bccd4163a8d714eaae683af53accc389fd73fdd0000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000000000000000d50ef7b662a07d3fc934891e488b133313cbfd7d0000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000000000000000e90975bd7b1937dfa4bf3d9c41368a07255607050000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000000000000000e817579b91ae59512ebdb860146001d170018e550000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000000000000000000006cd68754b97db054b68397e27ddcdc16d27afb220000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000000000000000000002ab2231d49154bb22b58df44b122ef9ba3ae97990000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000000000000000000001ea33eb00f2c2f00e1021fd7e9dd22154c82b06f0000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000000000000000844d2c79c4a721cbe153b092ba75b4c1e7cb2bc30000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000000000000000182ff57e69ec50eff8fc4a9e19e4d02d75061d320000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000000000000000b07d074825596798f6e127f86825aafaa81cdd7e0000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000000000000000d39d0a6b980218038c4675310399cecebb54de600000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
36
      )
37
      .with('to', '0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761')
38
      .build();
39
    const expectedResponse: DataDecoded = {
×
40
      method: 'multiSend',
41
      parameters: [
42
        {
43
          name: 'transactions',
44
          type: 'bytes',
45
          value:
46
            '0x0031369c6ecb549c117aff789ad66c708a452296740000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000000000000000ccd7c90b85e48682a68e7db1dc1f0339ea46ab020000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000000000000000c20aef7964d6c3c966e3ae9e850aee9db81792e30000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000000000000000000000bccd4163a8d714eaae683af53accc389fd73fdd0000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000000000000000d50ef7b662a07d3fc934891e488b133313cbfd7d0000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000000000000000e90975bd7b1937dfa4bf3d9c41368a07255607050000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000000000000000e817579b91ae59512ebdb860146001d170018e550000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000000000000000000006cd68754b97db054b68397e27ddcdc16d27afb220000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000000000000000000002ab2231d49154bb22b58df44b122ef9ba3ae97990000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000000000000000000001ea33eb00f2c2f00e1021fd7e9dd22154c82b06f0000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000000000000000844d2c79c4a721cbe153b092ba75b4c1e7cb2bc30000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000000000000000182ff57e69ec50eff8fc4a9e19e4d02d75061d320000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000000000000000b07d074825596798f6e127f86825aafaa81cdd7e0000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000000000000000d39d0a6b980218038c4675310399cecebb54de600000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000000000000000000',
47
          valueDecoded: [
48
            {
49
              operation: 0,
50
              to: '0x31369C6ECB549C117aFF789Ad66C708A45229674',
51
              value: '1000000000000000000',
52
              data: null,
53
              dataDecoded: null,
54
            },
55
            {
56
              operation: 0,
57
              to: '0xccd7C90B85e48682A68E7Db1dC1F0339EA46Ab02',
58
              value: '1000000000000000000',
59
              data: null,
60
              dataDecoded: null,
61
            },
62
            {
63
              operation: 0,
64
              to: '0xc20AeF7964d6c3C966E3Ae9E850aEe9DB81792E3',
65
              value: '1000000000000000000',
66
              data: null,
67
              dataDecoded: null,
68
            },
69
            {
70
              operation: 0,
71
              to: '0x0bCcD4163a8D714EAAE683AF53accC389Fd73FDD',
72
              value: '1000000000000000000',
73
              data: null,
74
              dataDecoded: null,
75
            },
76
            {
77
              operation: 0,
78
              to: '0xD50EF7b662A07d3fc934891e488B133313cBFd7d',
79
              value: '1000000000000000000',
80
              data: null,
81
              dataDecoded: null,
82
            },
83
            {
84
              operation: 0,
85
              to: '0xe90975BD7B1937DfA4BF3d9c41368a0725560705',
86
              value: '1000000000000000000',
87
              data: null,
88
              dataDecoded: null,
89
            },
90
            {
91
              operation: 0,
92
              to: '0xE817579b91aE59512EbdB860146001D170018e55',
93
              value: '1000000000000000000',
94
              data: null,
95
              dataDecoded: null,
96
            },
97
            {
98
              operation: 0,
99
              to: '0x6cD68754B97DB054b68397E27ddcdC16D27AfB22',
100
              value: '1000000000000000000',
101
              data: null,
102
              dataDecoded: null,
103
            },
104
            {
105
              operation: 0,
106
              to: '0x2ab2231D49154bB22b58df44B122ef9BA3Ae9799',
107
              value: '1000000000000000000',
108
              data: null,
109
              dataDecoded: null,
110
            },
111
            {
112
              operation: 0,
113
              to: '0x1ea33eb00F2C2F00e1021FD7E9dD22154C82b06F',
114
              value: '1000000000000000000',
115
              data: null,
116
              dataDecoded: null,
117
            },
118
            {
119
              operation: 0,
120
              to: '0x844d2C79C4a721CBe153B092bA75B4c1E7Cb2BC3',
121
              value: '1000000000000000000',
122
              data: null,
123
              dataDecoded: null,
124
            },
125
            {
126
              operation: 0,
127
              to: '0x182FF57E69eC50eFF8fc4a9E19e4d02D75061D32',
128
              value: '1000000000000000000',
129
              data: null,
130
              dataDecoded: null,
131
            },
132
            {
133
              operation: 0,
134
              to: '0xB07d074825596798f6e127f86825AAFaA81Cdd7e',
135
              value: '1000000000000000000',
136
              data: null,
137
              dataDecoded: null,
138
            },
139
            {
140
              operation: 0,
141
              to: '0xd39d0a6b980218038C4675310399cecEbb54DE60',
142
              value: '1000000000000000000',
143
              data: null,
144
              dataDecoded: null,
145
            },
146
          ],
147
        },
148
      ],
149
    };
150

151
    await request(app.getHttpServer())
×
152
      .post(`/v1/chains/${chainId}/data-decoder`)
153
      .send(getDataDecodedDto)
154
      .expect(200)
155
      .then(({ body }) => {
156
        expect(body).toEqual(expectedResponse);
×
157
      });
158
  });
159

160
  it('POST /data-decoder should throw a validation error', async () => {
×
161
    const getDataDecodedDto = getDataDecodedDtoBuilder().build();
×
162

163
    await request(app.getHttpServer())
×
164
      .post(`/v1/chains/${chainId}/data-decoder`)
165
      .send({ ...getDataDecodedDto, to: faker.number.int() })
166
      .expect(400)
167
      .expect({ message: 'Validation failed', code: 42, arguments: [] });
168
  });
169

170
  it('POST /data-decoder should throw a validation error (2)', async () => {
×
171
    const getDataDecodedDto = getDataDecodedDtoBuilder().build();
×
172

173
    await request(app.getHttpServer())
×
174
      .post(`/v1/chains/${chainId}/data-decoder`)
175
      .send({ ...getDataDecodedDto, to: faker.string.alphanumeric() })
176
      .expect(400)
177
      .expect({ message: 'Validation failed', code: 42, arguments: [] });
178
  });
179

180
  afterAll(async () => {
×
181
    await app.close();
×
182
    await redisClient.flushAll();
×
183
    await redisClient.quit();
×
184
  });
185
});
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc